From 99c848455aca397335c3d57e85c3f7c82f5b0a9d Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Wed, 19 Dec 2012 01:20:37 +0000 Subject: prevent MIDI tracks from ever being in MonitoringSilence state, allows use of piano roll whether rolling or not git-svn-id: svn://localhost/ardour2/branches/3.0@13679 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/track.cc | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) (limited to 'libs/ardour/track.cc') diff --git a/libs/ardour/track.cc b/libs/ardour/track.cc index c7cff72fd3..52a960fce6 100644 --- a/libs/ardour/track.cc +++ b/libs/ardour/track.cc @@ -370,19 +370,34 @@ Track::no_roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame, into the route. */ be_silent = true; + } else { + MonitorState const s = monitoring_state (); /* we are not rolling, so be silent even if we are monitoring disk, as there will be no disk data coming in. */ - be_silent = (s == MonitoringSilence || s == MonitoringDisk); + switch (s) { + case MonitoringSilence: + /* if there is an instrument, be_silent should always + be false + */ + be_silent = (the_instrument_unlocked() == 0); + break; + case MonitoringDisk: + be_silent = true; + break; + case MonitoringInput: + be_silent = false; + break; + } } - + if (!_have_internal_generator && metering_state() == MeteringInput) { _input->process_input (_meter, start_frame, end_frame, nframes); } - _amp->apply_gain_automation(false); + _amp->apply_gain_automation (false); /* if have_internal_generator, or .. */ //_input->process_input (_meter, start_frame, end_frame, nframes); -- cgit v1.2.3