mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
AUv2: Update a plugins latency after AudioUnitInitialize is called
This commit is contained in:
parent
ded6f901f9
commit
f49ab1d50e
1 changed files with 9 additions and 7 deletions
|
|
@ -1290,8 +1290,6 @@ public:
|
|||
|
||||
setRateAndBufferSizeDetails ((double) newSampleRate, estimatedSamplesPerBlock);
|
||||
|
||||
updateLatency();
|
||||
|
||||
zerostruct (timeStamp);
|
||||
timeStamp.mSampleTime = 0;
|
||||
timeStamp.mHostTime = mach_absolute_time();
|
||||
|
|
@ -1306,19 +1304,23 @@ public:
|
|||
if (! syncBusLayouts (getBusesLayout(), false, ignore))
|
||||
return;
|
||||
|
||||
prepared = (AudioUnitInitialize (audioUnit) == noErr);
|
||||
|
||||
if (prepared)
|
||||
prepared = [&]
|
||||
{
|
||||
if (AudioUnitInitialize (audioUnit) != noErr)
|
||||
return false;
|
||||
|
||||
if (! haveParameterList)
|
||||
refreshParameterList();
|
||||
|
||||
if (! syncBusLayouts (getBusesLayout(), true, ignore))
|
||||
{
|
||||
prepared = false;
|
||||
AudioUnitUninitialize (audioUnit);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
updateLatency();
|
||||
return true;
|
||||
}();
|
||||
|
||||
inMapping .setUpMapping (audioUnit, true);
|
||||
outMapping.setUpMapping (audioUnit, false);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue