|
@@ -1290,8 +1290,6 @@ public: |
|
|
|
|
|
|
|
|
setRateAndBufferSizeDetails ((double) newSampleRate, estimatedSamplesPerBlock);
|
|
|
setRateAndBufferSizeDetails ((double) newSampleRate, estimatedSamplesPerBlock);
|
|
|
|
|
|
|
|
|
updateLatency();
|
|
|
|
|
|
|
|
|
|
|
|
zerostruct (timeStamp);
|
|
|
zerostruct (timeStamp);
|
|
|
timeStamp.mSampleTime = 0;
|
|
|
timeStamp.mSampleTime = 0;
|
|
|
timeStamp.mHostTime = mach_absolute_time();
|
|
|
timeStamp.mHostTime = mach_absolute_time();
|
|
@@ -1306,19 +1304,23 @@ public: |
|
|
if (! syncBusLayouts (getBusesLayout(), false, ignore))
|
|
|
if (! syncBusLayouts (getBusesLayout(), false, ignore))
|
|
|
return;
|
|
|
return;
|
|
|
|
|
|
|
|
|
prepared = (AudioUnitInitialize (audioUnit) == noErr);
|
|
|
|
|
|
|
|
|
|
|
|
if (prepared)
|
|
|
|
|
|
|
|
|
prepared = [&]
|
|
|
{
|
|
|
{
|
|
|
|
|
|
if (AudioUnitInitialize (audioUnit) != noErr)
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
|
if (! haveParameterList)
|
|
|
if (! haveParameterList)
|
|
|
refreshParameterList();
|
|
|
refreshParameterList();
|
|
|
|
|
|
|
|
|
if (! syncBusLayouts (getBusesLayout(), true, ignore))
|
|
|
if (! syncBusLayouts (getBusesLayout(), true, ignore))
|
|
|
{
|
|
|
{
|
|
|
prepared = false;
|
|
|
|
|
|
AudioUnitUninitialize (audioUnit);
|
|
|
AudioUnitUninitialize (audioUnit);
|
|
|
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
updateLatency();
|
|
|
|
|
|
return true;
|
|
|
|
|
|
}();
|
|
|
|
|
|
|
|
|
inMapping .setUpMapping (audioUnit, true);
|
|
|
inMapping .setUpMapping (audioUnit, true);
|
|
|
outMapping.setUpMapping (audioUnit, false);
|
|
|
outMapping.setUpMapping (audioUnit, false);
|
|
|