diff options
author | Robin Gareus <robin@gareus.org> | 2016-04-15 13:36:02 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2016-04-15 13:36:02 +0200 |
commit | 426e2f2a194c8daf70da2552a2ad03cfef316efd (patch) | |
tree | 2cd7f2494bf3ea1632320ee60b3c273390862b0f /libs/ardour/audio_unit.cc | |
parent | 52a8bad4a26f5ac75598ee0674d192dad5ade857 (diff) |
AU synth inplace processing
Diffstat (limited to 'libs/ardour/audio_unit.cc')
-rw-r--r-- | libs/ardour/audio_unit.cc | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/libs/ardour/audio_unit.cc b/libs/ardour/audio_unit.cc index cab6a56c92..2ded196f52 100644 --- a/libs/ardour/audio_unit.cc +++ b/libs/ardour/audio_unit.cc @@ -1471,9 +1471,18 @@ AUPlugin::connect_and_run (BufferSet& bufs, ChanMapping in_map, ChanMapping out_ _last_nframes = nframes; } - DEBUG_TRACE (DEBUG::AudioUnits, string_compose ("%1 in %2 out %3 MIDI %4 bufs %5 (available %6)\n", + /* test if we can run in-place; only compare audio buffers */ + bool inplace = true; + ChanMapping::Mappings inmap (in_map.mappings ()); + ChanMapping::Mappings outmap (out_map.mappings ()); + assert (outmap[DataType::AUDIO].size () > 0); + if (inmap[DataType::AUDIO].size() > 0 && inmap != outmap) { + inplace = false; + } + + DEBUG_TRACE (DEBUG::AudioUnits, string_compose ("%1 in %2 out %3 MIDI %4 bufs %5 (available %6) Inplace: %7\n", name(), input_channels, output_channels, _has_midi_input, - bufs.count(), bufs.available())); + bufs.count(), bufs.available(), inplace)); /* the apparent number of buffers matches our input configuration, but we know that the bufferset * has the capacity to handle our outputs. @@ -1488,7 +1497,6 @@ AUPlugin::connect_and_run (BufferSet& bufs, ChanMapping in_map, ChanMapping out_ cb_offset = 0; buffers->mNumberBuffers = output_channels; - bool inplace = in_map == out_map; ChanCount bufs_count (DataType::AUDIO, 1); BufferSet& scratch_bufs = _session.get_scratch_buffers(bufs_count); |