mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Added missing call to JuceAU's base class' SetBusCount method
This commit is contained in:
parent
7e39b58b31
commit
dd2d64c363
1 changed files with 11 additions and 4 deletions
|
|
@ -304,9 +304,17 @@ public:
|
|||
if ((! juceFilter->canAddBus (isInput)) && ((busCount == 0) || (! juceFilter->canRemoveBus (isInput))))
|
||||
return kAudioUnitErr_PropertyNotWritable;
|
||||
|
||||
// we need to already create the underlying elements so that we can change their formats
|
||||
err = MusicDeviceBase::SetBusCount (scope, count);
|
||||
|
||||
if (err != noErr)
|
||||
return err;
|
||||
|
||||
// however we do need to update the format tag: we need to do the same thing in SetFormat, for example
|
||||
const int requestedNumBus = static_cast<int> (count);
|
||||
{
|
||||
(isInput ? currentInputLayout : currentOutputLayout).resize (requestedNumBus);
|
||||
|
||||
int busNr;
|
||||
|
||||
for (busNr = (busCount - 1); busNr != (requestedNumBus - 1); busNr += (requestedNumBus > busCount ? 1 : -1))
|
||||
|
|
@ -331,10 +339,6 @@ public:
|
|||
err = (busNr == (requestedNumBus - 1) ? noErr : kAudioUnitErr_FormatNotSupported);
|
||||
}
|
||||
|
||||
// we need to already create the underlying elements so that we can change their formats
|
||||
if (err == noErr)
|
||||
err = MusicDeviceBase::SetBusCount (scope, count);
|
||||
|
||||
// was there an error?
|
||||
if (err != noErr)
|
||||
{
|
||||
|
|
@ -348,6 +352,9 @@ public:
|
|||
juceFilter->removeBus (isInput);
|
||||
}
|
||||
|
||||
(isInput ? currentInputLayout : currentOutputLayout).resize (busCount);
|
||||
MusicDeviceBase::SetBusCount (scope, static_cast<UInt32> (busCount));
|
||||
|
||||
return kAudioUnitErr_FormatNotSupported;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue