Saturday, 14 September 2013

How Do I Route Audio to Speaker in iOS7?

How Do I Route Audio to Speaker in iOS7?

As AudioSessionSetProperty is deprecated, I'm trying to find an code
example of how to route audio to the speaker for iOS 7.
Previously I did the following:
-(void)setSpeakerEnabled
{
debugLog(@"%s",__FUNCTION__);
UInt32 audioRouteOverride = kAudioSessionOverrideAudioRoute_Speaker;
AudioSessionSetProperty (
kAudioSessionProperty_OverrideAudioRoute,
sizeof (audioRouteOverride),
&audioRouteOverride
);
}
Trying to get same result but without call to deprecated call to
AudioSessionSetProperty.

No comments:

Post a Comment