summaryrefslogtreecommitdiff
path: root/libs/ardour
diff options
context:
space:
mode:
Diffstat (limited to 'libs/ardour')
-rw-r--r--libs/ardour/ardour/session.h4
-rw-r--r--libs/ardour/ltc_slave.cc10
-rw-r--r--libs/ardour/luabindings.cc2
-rw-r--r--libs/ardour/mtc_slave.cc4
-rw-r--r--libs/ardour/session.cc2
-rw-r--r--libs/ardour/session_ltc.cc4
-rw-r--r--libs/ardour/session_midi.cc12
-rw-r--r--libs/ardour/session_time.cc6
8 files changed, 22 insertions, 22 deletions
diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h
index 3135e26333..367c5bd29d 100644
--- a/libs/ardour/ardour/session.h
+++ b/libs/ardour/ardour/session.h
@@ -450,7 +450,7 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop
framecnt_t nominal_frame_rate () const { return _nominal_frame_rate; }
framecnt_t frames_per_hour () const { return _frames_per_hour; }
- double frames_per_timecode_frame() const { return _frames_per_timecode_frame; }
+ double samples_per_timecode_frame() const { return _samples_per_timecode_frame; }
framecnt_t timecode_frames_per_hour() const { return _timecode_frames_per_hour; }
MIDI::byte get_mtc_timecode_bits() const {
@@ -1604,7 +1604,7 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop
Timecode::Time transmitting_timecode_time;
int next_quarter_frame_to_send;
- double _frames_per_timecode_frame; /* has to be floating point because of drop frame */
+ double _samples_per_timecode_frame; /* has to be floating point because of drop frame */
framecnt_t _frames_per_hour;
framecnt_t _timecode_frames_per_hour;
diff --git a/libs/ardour/ltc_slave.cc b/libs/ardour/ltc_slave.cc
index 6167c6bda2..2501378017 100644
--- a/libs/ardour/ltc_slave.cc
+++ b/libs/ardour/ltc_slave.cc
@@ -45,7 +45,7 @@ using namespace Timecode;
LTC_Slave::LTC_Slave (Session& s)
: session (s)
{
- frames_per_ltc_frame = session.frames_per_timecode_frame();
+ frames_per_ltc_frame = session.samples_per_timecode_frame();
timecode.rate = session.timecode_frames_per_second();
timecode.drop = session.timecode_drop_frames();
@@ -365,13 +365,13 @@ LTC_Slave::process_ltc(framepos_t const /*now*/)
ltc_frame_increment(&frame.ltc, fps_i, tv_standard, 0);
ltc_frame_to_time(&stime, &frame.ltc, 0);
transport_direction = 1;
- frame.off_start -= ltc_frame_alignment(session.frames_per_timecode_frame(), tv_standard);
- frame.off_end -= ltc_frame_alignment(session.frames_per_timecode_frame(), tv_standard);
+ frame.off_start -= ltc_frame_alignment(session.samples_per_timecode_frame(), tv_standard);
+ frame.off_end -= ltc_frame_alignment(session.samples_per_timecode_frame(), tv_standard);
} else {
ltc_frame_decrement(&frame.ltc, fps_i, tv_standard, 0);
int off = frame.off_end - frame.off_start;
- frame.off_start += off - ltc_frame_alignment(session.frames_per_timecode_frame(), tv_standard);
- frame.off_end += off - ltc_frame_alignment(session.frames_per_timecode_frame(), tv_standard);
+ frame.off_start += off - ltc_frame_alignment(session.samples_per_timecode_frame(), tv_standard);
+ frame.off_end += off - ltc_frame_alignment(session.samples_per_timecode_frame(), tv_standard);
transport_direction = -1;
}
diff --git a/libs/ardour/luabindings.cc b/libs/ardour/luabindings.cc
index 46e1d67551..8c97c49661 100644
--- a/libs/ardour/luabindings.cc
+++ b/libs/ardour/luabindings.cc
@@ -1769,7 +1769,7 @@ LuaBindings::common (lua_State* L)
.addFunction ("transport_speed", &Session::transport_speed)
.addFunction ("frame_rate", &Session::frame_rate)
.addFunction ("nominal_frame_rate", &Session::nominal_frame_rate)
- .addFunction ("frames_per_timecode_frame", &Session::frames_per_timecode_frame)
+ .addFunction ("samples_per_timecode_frame", &Session::samples_per_timecode_frame)
.addFunction ("timecode_frames_per_hour", &Session::timecode_frames_per_hour)
.addFunction ("timecode_frames_per_second", &Session::timecode_frames_per_second)
.addFunction ("timecode_drop_frames", &Session::timecode_drop_frames)
diff --git a/libs/ardour/mtc_slave.cc b/libs/ardour/mtc_slave.cc
index 102694e7ac..5eda7e14a5 100644
--- a/libs/ardour/mtc_slave.cc
+++ b/libs/ardour/mtc_slave.cc
@@ -65,7 +65,7 @@ MTC_Slave::MTC_Slave (Session& s, MidiPort& p)
busy_guard1 = busy_guard2 = 0;
last_mtc_fps_byte = session.get_mtc_timecode_bits ();
- quarter_frame_duration = (double(session.frames_per_timecode_frame()) / 4.0);
+ quarter_frame_duration = (double(session.samples_per_timecode_frame()) / 4.0);
mtc_timecode = session.config.get_timecode_format();
a3e_timecode = session.config.get_timecode_format();
@@ -448,7 +448,7 @@ MTC_Slave::update_mtc_time (const MIDI::byte *msg, bool was_full, framepos_t now
long int mtc_off = (long) rint(7.0 * qtr);
DEBUG_TRACE (DEBUG::MTC, string_compose ("new mtc_frame: %1 | MTC-FpT: %2 A3-FpT:%3\n",
- mtc_frame, (4.0*qtr), session.frames_per_timecode_frame()));
+ mtc_frame, (4.0*qtr), session.samples_per_timecode_frame()));
switch (port->self_parser().mtc_running()) {
case MTC_Backward:
diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc
index 08ed54c5c7..4bf070dc21 100644
--- a/libs/ardour/session.cc
+++ b/libs/ardour/session.cc
@@ -257,7 +257,7 @@ Session::Session (AudioEngine &eng,
, step_speed (0)
, outbound_mtc_timecode_frame (0)
, next_quarter_frame_to_send (-1)
- , _frames_per_timecode_frame (0)
+ , _samples_per_timecode_frame (0)
, _frames_per_hour (0)
, _timecode_frames_per_hour (0)
, last_timecode_valid (false)
diff --git a/libs/ardour/session_ltc.cc b/libs/ardour/session_ltc.cc
index 0ce7d766fc..51a39d0677 100644
--- a/libs/ardour/session_ltc.cc
+++ b/libs/ardour/session_ltc.cc
@@ -275,7 +275,7 @@ Session::ltc_tx_send_time_code_for_cycle (framepos_t start_frame, framepos_t end
/* LTC TV standard offset */
if (current_speed != 0) {
/* ditto - send "NOW" if not rolling */
- cycle_start_frame -= ltc_frame_alignment(frames_per_timecode_frame(), TV_STANDARD(cur_timecode));
+ cycle_start_frame -= ltc_frame_alignment(samples_per_timecode_frame(), TV_STANDARD(cur_timecode));
}
/* cycle-start may become negative due to latency compensation */
@@ -448,7 +448,7 @@ Session::ltc_tx_send_time_code_for_cycle (framepos_t start_frame, framepos_t end
// (4) check if alignment matches
- const double fptcf = frames_per_timecode_frame();
+ const double fptcf = samples_per_timecode_frame();
/* maximum difference of bit alignment in audio-samples.
*
diff --git a/libs/ardour/session_midi.cc b/libs/ardour/session_midi.cc
index 3a321e4ff6..b0fb946011 100644
--- a/libs/ardour/session_midi.cc
+++ b/libs/ardour/session_midi.cc
@@ -426,13 +426,13 @@ Session::send_full_time_code (framepos_t const t, MIDI::pframes_t nframes)
// or a new full timecode will be queued next cycle.
while (outbound_mtc_timecode_frame < t) {
Timecode::increment (transmitting_timecode_time, config.get_subframes_per_frame());
- outbound_mtc_timecode_frame += _frames_per_timecode_frame;
+ outbound_mtc_timecode_frame += _samples_per_timecode_frame;
}
- double const quarter_frame_duration = ((framecnt_t) _frames_per_timecode_frame) / 4.0;
+ double const quarter_frame_duration = ((framecnt_t) _samples_per_timecode_frame) / 4.0;
if (ceil((t - mtc_tc) / quarter_frame_duration) > 0) {
Timecode::increment (transmitting_timecode_time, config.get_subframes_per_frame());
- outbound_mtc_timecode_frame += _frames_per_timecode_frame;
+ outbound_mtc_timecode_frame += _samples_per_timecode_frame;
}
DEBUG_TRACE (DEBUG::MTC, string_compose ("Full MTC TC %1 (off %2)\n", outbound_mtc_timecode_frame, mtc_offset));
@@ -443,7 +443,7 @@ Session::send_full_time_code (framepos_t const t, MIDI::pframes_t nframes)
if (((mtc_timecode_bits >> 5) != MIDI::MTC_25_FPS) && (transmitting_timecode_time.frames % 2)) {
// start MTC quarter frame transmission on an even frame
Timecode::increment (transmitting_timecode_time, config.get_subframes_per_frame());
- outbound_mtc_timecode_frame += _frames_per_timecode_frame;
+ outbound_mtc_timecode_frame += _samples_per_timecode_frame;
}
next_quarter_frame_to_send = 0;
@@ -507,7 +507,7 @@ Session::send_midi_time_code_for_cycle (framepos_t start_frame, framepos_t end_f
assert (next_quarter_frame_to_send <= 7);
/* Duration of one quarter frame */
- double const quarter_frame_duration = _frames_per_timecode_frame / 4.0;
+ double const quarter_frame_duration = _samples_per_timecode_frame / 4.0;
DEBUG_TRACE (DEBUG::MTC, string_compose ("TF %1 SF %2 MT %3 QF %4 QD %5\n",
_transport_frame, start_frame, outbound_mtc_timecode_frame,
@@ -592,7 +592,7 @@ Session::send_midi_time_code_for_cycle (framepos_t start_frame, framepos_t end_f
Timecode::increment (transmitting_timecode_time, config.get_subframes_per_frame());
Timecode::increment (transmitting_timecode_time, config.get_subframes_per_frame());
// Increment timing of first quarter frame
- outbound_mtc_timecode_frame += 2.0 * _frames_per_timecode_frame;
+ outbound_mtc_timecode_frame += 2.0 * _samples_per_timecode_frame;
}
}
diff --git a/libs/ardour/session_time.cc b/libs/ardour/session_time.cc
index 8f080285e2..3b3be8f3b2 100644
--- a/libs/ardour/session_time.cc
+++ b/libs/ardour/session_time.cc
@@ -67,11 +67,11 @@ void
Session::sync_time_vars ()
{
_current_frame_rate = (framecnt_t) round (_nominal_frame_rate * (1.0 + (config.get_video_pullup()/100.0)));
- _frames_per_timecode_frame = (double) _current_frame_rate / (double) timecode_frames_per_second();
+ _samples_per_timecode_frame = (double) _current_frame_rate / (double) timecode_frames_per_second();
if (timecode_drop_frames()) {
- _frames_per_hour = (int32_t)(107892 * _frames_per_timecode_frame);
+ _frames_per_hour = (int32_t)(107892 * _samples_per_timecode_frame);
} else {
- _frames_per_hour = (int32_t)(3600 * rint(timecode_frames_per_second()) * _frames_per_timecode_frame);
+ _frames_per_hour = (int32_t)(3600 * rint(timecode_frames_per_second()) * _samples_per_timecode_frame);
}
_timecode_frames_per_hour = rint(timecode_frames_per_second() * 3600.0);