revert previous commit (it should work, but did not); minor tweaks elsewhere
git-svn-id: svn://localhost/ardour2/branches/3.0@12084 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
@@ -538,7 +538,7 @@ Session::when_engine_running ()
|
||||
|
||||
BootMessage (_("Setup signal flow and plugins"));
|
||||
|
||||
/* Reset all panners */
|
||||
/* Reset all panners */
|
||||
|
||||
Delivery::reset_panners ();
|
||||
|
||||
|
||||
@@ -96,7 +96,6 @@ Session::process (pframes_t nframes)
|
||||
}
|
||||
|
||||
SendFeedback (); /* EMIT SIGNAL */
|
||||
|
||||
}
|
||||
|
||||
int
|
||||
|
||||
@@ -68,20 +68,26 @@ GenericMidiControlProtocol::GenericMidiControlProtocol (Session& s)
|
||||
_current_bank = 0;
|
||||
_bank_size = 0;
|
||||
|
||||
/* XXX is it right to do all these in the same thread as whatever emits the signal? */
|
||||
/* these signals are emitted by the MidiControlUI's event loop thread
|
||||
* and we may as well handle them right there in the same the same
|
||||
* thread
|
||||
*/
|
||||
|
||||
Controllable::StartLearning.connect_same_thread (*this, boost::bind (&GenericMidiControlProtocol::start_learning, this, _1));
|
||||
Controllable::StopLearning.connect_same_thread (*this, boost::bind (&GenericMidiControlProtocol::stop_learning, this, _1));
|
||||
Controllable::CreateBinding.connect_same_thread (*this, boost::bind (&GenericMidiControlProtocol::create_binding, this, _1, _2, _3));
|
||||
Controllable::DeleteBinding.connect_same_thread (*this, boost::bind (&GenericMidiControlProtocol::delete_binding, this, _1));
|
||||
|
||||
Session::SendFeedback.connect (*this, MISSING_INVALIDATOR, ui_bind (&GenericMidiControlProtocol::send_feedback, this), midi_ui_context());;
|
||||
#if 0
|
||||
/* XXXX SOMETHING GOES WRONG HERE (april 2012) - STILL DEBUGGING */
|
||||
/* this signal is emitted by the process() callback, and if
|
||||
* send_feedback() is going to do anything, it should do it in the
|
||||
* context of the process() callback itself.
|
||||
*/
|
||||
|
||||
Session::SendFeedback.connect_same_thread (*this, boost::bind (&GenericMidiControlProtocol::send_feedback, this));
|
||||
|
||||
#endif
|
||||
/* this one is cross-thread */
|
||||
|
||||
Route::RemoteControlIDChange.connect (*this, MISSING_INVALIDATOR, ui_bind (&GenericMidiControlProtocol::reset_controllables, this), midi_ui_context());
|
||||
@@ -244,6 +250,9 @@ GenericMidiControlProtocol::set_feedback_interval (microseconds_t ms)
|
||||
void
|
||||
GenericMidiControlProtocol::send_feedback ()
|
||||
{
|
||||
/* This is executed in RT "process" context", so no blocking calls
|
||||
*/
|
||||
|
||||
if (!do_feedback) {
|
||||
return;
|
||||
}
|
||||
@@ -264,6 +273,9 @@ GenericMidiControlProtocol::send_feedback ()
|
||||
void
|
||||
GenericMidiControlProtocol::_send_feedback ()
|
||||
{
|
||||
/* This is executed in RT "process" context", so no blocking calls
|
||||
*/
|
||||
|
||||
const int32_t bufsize = 16 * 1024; /* XXX too big */
|
||||
MIDI::byte buf[bufsize];
|
||||
int32_t bsize = bufsize;
|
||||
|
||||
Reference in New Issue
Block a user