mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-19 05:06:31 +01:00
Add BasicUI::engine_sample_time()
Towards removing the direct use of Session by surfaces.
This commit is contained in:
parent
36789f080c
commit
850bd44702
10 changed files with 19 additions and 19 deletions
|
|
@ -309,7 +309,7 @@ CC121::button_press_handler (MIDI::Parser &, MIDI::EventTwoBytes* tb)
|
|||
if (_current_stripable) {
|
||||
boost::shared_ptr<AutomationControl> gain = _current_stripable->gain_control ();
|
||||
if (gain) {
|
||||
timepos_t now (_session->engine().sample_time());
|
||||
timepos_t now (engine_sample_time());
|
||||
gain->start_touch (now);
|
||||
}
|
||||
}
|
||||
|
|
@ -356,7 +356,7 @@ CC121::button_release_handler (MIDI::Parser &, MIDI::EventTwoBytes* tb)
|
|||
if (_current_stripable) {
|
||||
boost::shared_ptr<AutomationControl> gain = _current_stripable->gain_control ();
|
||||
if (gain) {
|
||||
timepos_t now (_session->engine().sample_time());
|
||||
timepos_t now (engine_sample_time());
|
||||
gain->stop_touch (now);
|
||||
}
|
||||
}
|
||||
|
|
@ -706,8 +706,7 @@ CC121::midi_input_handler (Glib::IOCondition ioc, boost::shared_ptr<ARDOUR::Asyn
|
|||
|
||||
port->clear ();
|
||||
DEBUG_TRACE (DEBUG::CC121, string_compose ("data available on %1\n", boost::shared_ptr<MIDI::Port>(port)->name()));
|
||||
samplepos_t now = _session->engine().sample_time();
|
||||
port->parse (now);
|
||||
port->parse (engine_sample_time ());
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -726,6 +726,12 @@ BasicUI::locked ()
|
|||
return _session->transport_locked ();
|
||||
}
|
||||
|
||||
ARDOUR::samplepos_t
|
||||
BasicUI::engine_sample_time ()
|
||||
{
|
||||
return _session->engine ().sample_time ();
|
||||
}
|
||||
|
||||
ARDOUR::samplecnt_t
|
||||
BasicUI::timecode_frames_per_hour ()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -76,6 +76,8 @@ class LIBCONTROLCP_API BasicUI {
|
|||
bool locating ();
|
||||
bool locked ();
|
||||
|
||||
samplepos_t engine_sample_time ();
|
||||
|
||||
void save_state ();
|
||||
void prev_marker ();
|
||||
void next_marker ();
|
||||
|
|
|
|||
|
|
@ -367,7 +367,7 @@ FaderPort::button_handler (MIDI::Parser &, MIDI::EventTwoBytes* tb)
|
|||
if (_current_stripable) {
|
||||
boost::shared_ptr<AutomationControl> gain = _current_stripable->gain_control ();
|
||||
if (gain) {
|
||||
timepos_t now = timepos_t (_session->engine().sample_time());
|
||||
timepos_t now = timepos_t (engine_sample_time());
|
||||
if (tb->value) {
|
||||
gain->start_touch (now);
|
||||
} else {
|
||||
|
|
@ -747,8 +747,7 @@ FaderPort::midi_input_handler (Glib::IOCondition ioc, boost::weak_ptr<ARDOUR::As
|
|||
|
||||
port->clear ();
|
||||
DEBUG_TRACE (DEBUG::FaderPort, string_compose ("data available on %1\n", boost::shared_ptr<MIDI::Port>(port)->name()));
|
||||
samplepos_t now = _session->engine().sample_time();
|
||||
port->parse (now);
|
||||
port->parse (engine_sample_time());
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -526,8 +526,7 @@ FaderPort8::midi_input_handler (Glib::IOCondition ioc, boost::weak_ptr<ARDOUR::A
|
|||
#ifdef VERBOSE_DEBUG
|
||||
DEBUG_TRACE (DEBUG::FaderPort8, string_compose ("data available on %1\n", boost::shared_ptr<MIDI::Port>(port)->name()));
|
||||
#endif
|
||||
samplepos_t now = _session->engine().sample_time();
|
||||
port->parse (now);
|
||||
port->parse (engine_sample_time());
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -1657,8 +1657,7 @@ GenericMidiControlProtocol::midi_input_handler (Glib::IOCondition ioc, boost::we
|
|||
|
||||
port->clear ();
|
||||
DEBUG_TRACE (DEBUG::GenericMidi, string_compose ("data available on %1\n", boost::shared_ptr<MIDI::Port>(port)->name()));
|
||||
samplepos_t now = _session->engine().sample_time();
|
||||
port->parse (now);
|
||||
port->parse (engine_sample_time());
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -515,8 +515,7 @@ LaunchControlXL::midi_input_handler (IOCondition ioc, MIDI::Port* port)
|
|||
|
||||
DEBUG_TRACE (DEBUG::LaunchControlXL, string_compose ("data available on %1\n", port->name()));
|
||||
if (in_use) {
|
||||
samplepos_t now = AudioEngine::instance()->sample_time();
|
||||
port->parse (now);
|
||||
port->parse (engine_sample_time());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1699,8 +1699,7 @@ MackieControlProtocol::midi_input_handler (IOCondition ioc, MIDI::Port* port)
|
|||
}
|
||||
|
||||
// DEBUG_TRACE (DEBUG::MackieControl, string_compose ("data available on %1\n", port->name()));
|
||||
samplepos_t now = _session->engine().sample_time();
|
||||
port->parse (now);
|
||||
port->parse (engine_sample_time());
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -561,8 +561,7 @@ Push2::midi_input_handler (IOCondition ioc, MIDI::Port* port)
|
|||
|
||||
DEBUG_TRACE (DEBUG::Push2, string_compose ("data available on %1\n", port->name()));
|
||||
if (in_use) {
|
||||
samplepos_t now = AudioEngine::instance()->sample_time();
|
||||
port->parse (now);
|
||||
port->parse (engine_sample_time());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1351,8 +1351,7 @@ US2400Protocol::midi_input_handler (IOCondition ioc, MIDI::Port* port)
|
|||
}
|
||||
|
||||
// DEBUG_TRACE (DEBUG::US2400, string_compose ("data available on %1\n", port->name()));
|
||||
samplepos_t now = _session->engine().sample_time();
|
||||
port->parse (now);
|
||||
port->parse (engine_sample_time());
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue