Discard MIDI when sending to the monitor bus. Fixes
#4372. git-svn-id: svn://localhost/ardour2/branches/3.0@10212 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
6fc823aca8
commit
c7d2497e2b
@ -123,6 +123,7 @@ public:
|
||||
#endif
|
||||
|
||||
void read_from(const BufferSet& in, framecnt_t nframes);
|
||||
void read_from(const BufferSet& in, framecnt_t nframes, DataType);
|
||||
void merge_from(const BufferSet& in, framecnt_t nframes);
|
||||
|
||||
template <typename BS, typename B>
|
||||
|
@ -383,6 +383,21 @@ BufferSet::VSTBuffer::push_back (Evoral::MIDIEvent<framepos_t> const & ev)
|
||||
|
||||
#endif /* VST_SUPPORT */
|
||||
|
||||
/** Copy buffers of one type from `in' to this BufferSet */
|
||||
void
|
||||
BufferSet::read_from (const BufferSet& in, framecnt_t nframes, DataType type)
|
||||
{
|
||||
assert (available().get (type) >= in.count().get (type));
|
||||
|
||||
BufferSet::iterator o = begin (type);
|
||||
for (BufferSet::const_iterator i = in.begin (type); i != in.end (type); ++i, ++o) {
|
||||
o->read_from (*i, nframes);
|
||||
}
|
||||
|
||||
_count.set (type, in.count().get (type));
|
||||
}
|
||||
|
||||
/** Copy buffers of all types from `in' to this BufferSet */
|
||||
void
|
||||
BufferSet::read_from (const BufferSet& in, framecnt_t nframes)
|
||||
{
|
||||
@ -390,13 +405,8 @@ BufferSet::read_from (const BufferSet& in, framecnt_t nframes)
|
||||
|
||||
// Copy all buffers 1:1
|
||||
for (DataType::iterator t = DataType::begin(); t != DataType::end(); ++t) {
|
||||
BufferSet::iterator o = begin(*t);
|
||||
for (BufferSet::const_iterator i = in.begin(*t); i != in.end(*t); ++i, ++o) {
|
||||
o->read_from (*i, nframes);
|
||||
}
|
||||
read_from (in, nframes, *t);
|
||||
}
|
||||
|
||||
set_count(in.count());
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -116,8 +116,14 @@ InternalSend::run (BufferSet& bufs, framepos_t start_frame, framepos_t end_frame
|
||||
if (_panshell && !_panshell->bypassed()) {
|
||||
_panshell->run (bufs, mixbufs, start_frame, end_frame, nframes);
|
||||
} else {
|
||||
assert (mixbufs.available() >= bufs.count());
|
||||
mixbufs.read_from (bufs, nframes);
|
||||
if (role() == Listen) {
|
||||
/* We're going to the monitor bus, so discard MIDI data */
|
||||
assert (mixbufs.available().get (DataType::AUDIO) >= bufs.count().get (DataType::AUDIO));
|
||||
mixbufs.read_from (bufs, nframes, DataType::AUDIO);
|
||||
} else {
|
||||
assert (mixbufs.available() >= bufs.count());
|
||||
mixbufs.read_from (bufs, nframes);
|
||||
}
|
||||
}
|
||||
|
||||
/* gain control */
|
||||
|
Loading…
Reference in New Issue
Block a user