mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-10 16:46:35 +01:00
fix midi-capture filter
diskstream reads directly from port, Route use prefilled buffer-set.
This commit is contained in:
parent
d92608b05f
commit
e8c24f1efd
2 changed files with 12 additions and 5 deletions
|
|
@ -48,6 +48,7 @@
|
||||||
#include "ardour/midi_port.h"
|
#include "ardour/midi_port.h"
|
||||||
#include "ardour/midi_region.h"
|
#include "ardour/midi_region.h"
|
||||||
#include "ardour/midi_ring_buffer.h"
|
#include "ardour/midi_ring_buffer.h"
|
||||||
|
#include "ardour/midi_track.h"
|
||||||
#include "ardour/playlist_factory.h"
|
#include "ardour/playlist_factory.h"
|
||||||
#include "ardour/region_factory.h"
|
#include "ardour/region_factory.h"
|
||||||
#include "ardour/session.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?)
|
// Pump entire port buffer into the ring buffer (FIXME: split cycles?)
|
||||||
MidiBuffer& buf = sp->get_midi_buffer(nframes);
|
MidiBuffer& buf = sp->get_midi_buffer(nframes);
|
||||||
ChannelMode mode = AllChannels; // _track->get_capture_channel_mode ();
|
ChannelMode mode = AllChannels;
|
||||||
uint32_t mask = 0xffff; // _track->get_capture_channel_mask ();
|
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) {
|
for (MidiBuffer::iterator i = buf.begin(); i != buf.end(); ++i) {
|
||||||
Evoral::MIDIEvent<MidiBuffer::TimeType> ev(*i, false);
|
Evoral::MIDIEvent<MidiBuffer::TimeType> ev(*i, false);
|
||||||
|
|
|
||||||
|
|
@ -370,13 +370,13 @@ MidiTrack::roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame
|
||||||
|
|
||||||
fill_buffers_with_input (bufs, _input, nframes);
|
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())) {
|
if (_meter_point == MeterInput && (_monitoring & MonitorInput || _diskstream->record_enabled())) {
|
||||||
_meter->run (bufs, start_frame, end_frame, nframes, true);
|
_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;
|
_silent = false;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue