1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Set kAudioUnitProperty_MaximumFramesPerSlice on iOS

This commit is contained in:
hogliux 2016-05-19 09:46:38 +01:00
parent 2c3783e834
commit b3ee8806d6

View file

@ -682,7 +682,8 @@ private:
UInt32 framesPerSlice;
UInt32 dataSize = sizeof (framesPerSlice);
if (AudioUnitGetProperty (audioUnit, kAudioUnitProperty_MaximumFramesPerSlice, kAudioUnitScope_Global, 0, &framesPerSlice, &dataSize) == noErr
if (AudioUnitSetProperty (audioUnit, kAudioUnitProperty_MaximumFramesPerSlice, kAudioUnitScope_Global, 0, &actualBufferSize, sizeof (actualBufferSize)) == noErr
&& AudioUnitGetProperty (audioUnit, kAudioUnitProperty_MaximumFramesPerSlice, kAudioUnitScope_Global, 0, &framesPerSlice, &dataSize) == noErr
&& dataSize == sizeof (framesPerSlice) && framesPerSlice != actualBufferSize)
{
actualBufferSize = framesPerSlice;