summaryrefslogtreecommitdiff
path: root/libs/ardour/session_vst.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2017-09-18 12:39:17 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2017-09-18 12:39:17 -0400
commit30b087ab3d28f1585987fa3f6ae006562ae192e3 (patch)
tree620ae0250b5d77f90a18f8c2b83be61e4fe7b0b5 /libs/ardour/session_vst.cc
parentcb956e3e480716a3efd280a5287bdd7bee1cedc5 (diff)
globally change all use of "frame" to refer to audio into "sample".
Generated by tools/f2s. Some hand-editing will be required in a few places to fix up comments related to timecode and video in order to keep the legible
Diffstat (limited to 'libs/ardour/session_vst.cc')
-rw-r--r--libs/ardour/session_vst.cc28
1 files changed, 14 insertions, 14 deletions
diff --git a/libs/ardour/session_vst.cc b/libs/ardour/session_vst.cc
index 3950a29478..1b25659cc9 100644
--- a/libs/ardour/session_vst.cc
+++ b/libs/ardour/session_vst.cc
@@ -172,18 +172,18 @@ intptr_t Session::vst_callback (
timeinfo->nanoSeconds = g_get_monotonic_time () * 1000;
if (plug && session) {
- framepos_t now = plug->transport_frame();
+ samplepos_t now = plug->transport_sample();
timeinfo->samplePos = now;
- timeinfo->sampleRate = session->frame_rate();
+ timeinfo->sampleRate = session->sample_rate();
if (value & (kVstTempoValid)) {
- const Tempo& t (session->tempo_map().tempo_at_frame (now));
+ const Tempo& t (session->tempo_map().tempo_at_sample (now));
timeinfo->tempo = t.quarter_notes_per_minute ();
newflags |= (kVstTempoValid);
}
if (value & (kVstTimeSigValid)) {
- const MeterSection& ms (session->tempo_map().meter_section_at_frame (now));
+ const MeterSection& ms (session->tempo_map().meter_section_at_sample (now));
timeinfo->timeSigNumerator = ms.divisions_per_bar ();
timeinfo->timeSigDenominator = ms.note_divisor ();
newflags |= (kVstTimeSigValid);
@@ -192,13 +192,13 @@ intptr_t Session::vst_callback (
Timecode::BBT_Time bbt;
try {
- bbt = session->tempo_map().bbt_at_frame_rt (now);
+ bbt = session->tempo_map().bbt_at_sample_rt (now);
bbt.beats = 1;
bbt.ticks = 0;
/* exact quarter note */
double ppqBar = session->tempo_map().quarter_note_at_bbt_rt (bbt);
- /* quarter note at frame position (not rounded to note subdivision) */
- double ppqPos = session->tempo_map().quarter_note_at_frame_rt (now);
+ /* quarter note at sample position (not rounded to note subdivision) */
+ double ppqPos = session->tempo_map().quarter_note_at_sample_rt (now);
if (value & (kVstPpqPosValid)) {
timeinfo->ppqPos = ppqPos;
newflags |= kVstPpqPosValid;
@@ -225,7 +225,7 @@ intptr_t Session::vst_callback (
(t.frames) +
(t.subframes);
- timeinfo->smpteOffset *= 80.0; /* VST spec is 1/80th frames */
+ timeinfo->smpteOffset *= 80.0; /* VST spec is 1/80th samples */
if (session->timecode_drop_frames()) {
if (session->timecode_frames_per_second() == 30.0) {
@@ -259,8 +259,8 @@ intptr_t Session::vst_callback (
newflags |= kVstTransportCycleActive;
Location * looploc = session->locations ()->auto_loop_location ();
if (looploc) try {
- timeinfo->cycleStartPos = session->tempo_map ().quarter_note_at_frame_rt (looploc->start ());
- timeinfo->cycleEndPos = session->tempo_map ().quarter_note_at_frame_rt (looploc->end ());
+ timeinfo->cycleStartPos = session->tempo_map ().quarter_note_at_sample_rt (looploc->start ());
+ timeinfo->cycleEndPos = session->tempo_map ().quarter_note_at_sample_rt (looploc->end ());
newflags |= kVstCyclePosValid;
} catch (...) { }
@@ -289,7 +289,7 @@ intptr_t Session::vst_callback (
for (int n = 0 ; n < v->numEvents; ++n) {
VstMidiEvent *vme = (VstMidiEvent*) (v->events[n]->dump);
if (vme->type == kVstMidiType) {
- plug->midi_buffer()->push_back(vme->deltaFrames, 3, (uint8_t*)vme->midiData);
+ plug->midi_buffer()->push_back(vme->deltaSamples, 3, (uint8_t*)vme->midiData);
}
}
}
@@ -301,9 +301,9 @@ intptr_t Session::vst_callback (
case audioMasterTempoAt:
SHOW_CALLBACK ("audioMasterTempoAt");
- // returns tempo (in bpm * 10000) at sample frame location passed in <value>
+ // returns tempo (in bpm * 10000) at sample sample location passed in <value>
if (session) {
- const Tempo& t (session->tempo_map().tempo_at_frame (value));
+ const Tempo& t (session->tempo_map().tempo_at_sample (value));
return t.quarter_notes_per_minute() * 1000;
} else {
return 0;
@@ -351,7 +351,7 @@ intptr_t Session::vst_callback (
case audioMasterGetSampleRate:
SHOW_CALLBACK ("audioMasterGetSampleRate");
if (session) {
- return session->frame_rate();
+ return session->sample_rate();
}
return 0;