diff options
Diffstat (limited to 'libs/ardour/midi_track.cc')
-rw-r--r-- | libs/ardour/midi_track.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/libs/ardour/midi_track.cc b/libs/ardour/midi_track.cc index f7f9ff7a59..7c4ae24a2a 100644 --- a/libs/ardour/midi_track.cc +++ b/libs/ardour/midi_track.cc @@ -17,8 +17,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include <strings.h> // for ffs(3) - +#include "pbd/ffs.h" #include "pbd/enumwriter.h" #include "pbd/convert.h" #include "evoral/midi_util.h" @@ -330,6 +329,9 @@ MidiTrack::roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame if (!_active) { silence (nframes); + if (_meter_point == MeterInput && (_monitoring & MonitorInput || _diskstream->record_enabled())) { + _meter->reset(); + } return 0; } @@ -354,7 +356,7 @@ MidiTrack::roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame fill_buffers_with_input (bufs, _input, nframes); - if (_meter_point == MeterInput) { + if (_meter_point == MeterInput && (_monitoring & MonitorInput || _diskstream->record_enabled())) { _meter->run (bufs, start_frame, end_frame, nframes, true); } @@ -504,7 +506,7 @@ MidiTrack::filter_channels (BufferSet& bufs, ChannelMode mode, uint32_t mask) } break; case ForceChannel: - ev.set_channel (ffs (mask) - 1); + ev.set_channel (PBD::ffs (mask) - 1); ++e; break; case AllChannels: |