summaryrefslogtreecommitdiff
path: root/libs/ardour/audio_unit.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2015-02-25 00:42:03 +0100
committerRobin Gareus <robin@gareus.org>2015-02-25 00:42:54 +0100
commite38eb0613e036814f8787d4d51695580bd357c11 (patch)
treed53b2d506b6713e77c3d3a8a6d8e52e12d5db210 /libs/ardour/audio_unit.cc
parentfbdf6a815165e45ed63081cc919a8d8f7e24234b (diff)
no more AU warnings…
Ardour calls input_streams(), output_streams() to determine if the plugin is about to be re-configured (old stream I/O count != new I/O count) and emit PluginIoReConfigure() if that’s true. If the plugin has not been initialized (no format set), we can safely assume that it will need to be reconfigured. Forcing Audio=Midi=0 will do so. The only time where the format is not yet set and hence the actual channel count is still unknown) is during the first call to PluginInsert::configure_io(). At the time of writing, this all is a NOOP anyway! The only user of the PluginIoReConfigure() signal is the GUI to update connection lines… and since the first PluginInsert::configure_io() happens during insertion before the plugin is painted and subscribed to PluginIoReConfigure(), this function could return any value. Still 0,0 is just more appropriate than assuming mono audio in/out and no midi.
Diffstat (limited to 'libs/ardour/audio_unit.cc')
-rw-r--r--libs/ardour/audio_unit.cc13
1 files changed, 6 insertions, 7 deletions
diff --git a/libs/ardour/audio_unit.cc b/libs/ardour/audio_unit.cc
index 46a8c296f1..747c6f4b76 100644
--- a/libs/ardour/audio_unit.cc
+++ b/libs/ardour/audio_unit.cc
@@ -977,11 +977,11 @@ AUPlugin::input_streams() const
{
ChanCount c;
- c.set (DataType::AUDIO, 1);
- c.set (DataType::MIDI, 0);
if (input_channels < 0) {
- warning << string_compose (_("AUPlugin: %1 input_streams() called without any format set!"), name()) << endmsg;
+ // force PluginIoReConfigure
+ c.set (DataType::AUDIO, 0);
+ c.set (DataType::MIDI, 0);
} else {
c.set (DataType::AUDIO, input_channels);
c.set (DataType::MIDI, _has_midi_input ? 1 : 0);
@@ -996,11 +996,10 @@ AUPlugin::output_streams() const
{
ChanCount c;
- c.set (DataType::AUDIO, 1);
- c.set (DataType::MIDI, 0);
-
if (output_channels < 0) {
- warning << string_compose (_("AUPlugin: %1 output_streams() called without any format set!"), name()) << endmsg;
+ // force PluginIoReConfigure
+ c.set (DataType::AUDIO, 0);
+ c.set (DataType::MIDI, 0);
} else {
c.set (DataType::AUDIO, output_channels);
c.set (DataType::MIDI, _has_midi_output ? 1 : 0);