sm702 发表于 2016-1-2 10:40:25

TargetConditionals使用

  #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
  
页: [1]
查看完整版本: TargetConditionals使用