diff options
author | John Emmas <johne53@tiscali.co.uk> | 2013-07-17 18:15:51 +0100 |
---|---|---|
committer | John Emmas <johne53@tiscali.co.uk> | 2013-07-17 18:15:51 +0100 |
commit | 5f15bc9f9fe8decfab02db7821b7b15e1d7d95ac (patch) | |
tree | 643463d8f156a7ee6b4daa1c776e5ae2a9da16e0 /libs/ardour/midi_track.cc | |
parent | eeabf89d19214bb075709009a76b3354c4332ccf (diff) | |
parent | 82d351f6ca3214ef77df555aca853e18137b7ab4 (diff) |
Merge branch 'windows' of git.ardour.org:ardour/ardour into windows
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: |