听筒和扬声器的转换

UInt32 route = isSpeakerEnable?kAudioSessionOverrideAudioRoute_Speaker : kAudioSessionOverrideAudioRoute_None;

AudioSessionSetProperty(kAudioSessionProperty_OverrideAudioRoute, sizeof(route), &route);

你可能感兴趣的:(听筒和扬声器的转换)