fix midi-capture filter

diskstream reads directly from port, Route
use prefilled buffer-set.
This commit is contained in:
Robin Gareus 2015-02-12 00:59:55 +01:00
parent d92608b05f
commit e8c24f1efd
2 changed files with 12 additions and 5 deletions

View file

@ -48,6 +48,7 @@
#include "ardour/midi_port.h"
#include "ardour/midi_region.h"
#include "ardour/midi_ring_buffer.h"
#include "ardour/midi_track.h"
#include "ardour/playlist_factory.h"
#include "ardour/region_factory.h"
#include "ardour/session.h"
@ -404,8 +405,14 @@ MidiDiskstream::process (BufferSet& bufs, framepos_t transport_frame, pframes_t
// Pump entire port buffer into the ring buffer (FIXME: split cycles?)
MidiBuffer& buf = sp->get_midi_buffer(nframes);
ChannelMode mode = AllChannels; // _track->get_capture_channel_mode ();
uint32_t mask = 0xffff; // _track->get_capture_channel_mask ();
ChannelMode mode = AllChannels;
uint32_t mask = 0xffff;
MidiTrack * mt = dynamic_cast<MidiTrack*> (_track);
if (mt) {
mode = mt->get_capture_channel_mode ();
mask = mt->get_capture_channel_mask ();
}
for (MidiBuffer::iterator i = buf.begin(); i != buf.end(); ++i) {
Evoral::MIDIEvent<MidiBuffer::TimeType> ev(*i, false);

View file

@ -370,13 +370,13 @@ MidiTrack::roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame
fill_buffers_with_input (bufs, _input, nframes);
/* filter captured data before meter sees it */
filter_channels (bufs, get_capture_channel_mode(), get_capture_channel_mask());
if (_meter_point == MeterInput && (_monitoring & MonitorInput || _diskstream->record_enabled())) {
_meter->run (bufs, start_frame, end_frame, nframes, true);
}
/* filter captured data before the diskstream sees it */
filter_channels (bufs, get_capture_channel_mode(), get_capture_channel_mask());
_silent = false;