#import "TargetConditionals.h"
gcc based compiler used on Mac OS X
for EX
#if !TARGET_IPHONE_SIMULATOR
Float32 preferredBufferSize = 0.0232;
if (checkError(AudioSessionSetProperty(kAudioSessionProperty_PreferredHardwareIOBufferDuration,
sizeof(preferredBufferSize),
&preferredBufferSize),
"Couldn‘t set the preferred buffer duration")) {
// just warning
}
#endif
TargetConditionals使用
时间: 2025-01-15 06:29:29