Reputation: 40107
I'm using Matt Gallagher's awesome AudioStreamer example to play an audio file via AudioSession. All works, except that on my iPhone 4 I get audio playback out of my bottom speaker, and not the ear speaker. I inserted the following code to no avail.
UInt32 audioRouteOverride = kAudioSessionOverrideAudioRoute_None;
AudioSessionSetProperty (
kAudioSessionProperty_OverrideAudioRoute,
sizeof (audioRouteOverride),
&audioRouteOverride
);
Upvotes: 2
Views: 956
Reputation: 7649
for kAudioSessionProperty_OverrideAudioRoute:
"This property can be used only with the kAudioSessionCategory_PlayAndRecord (or the equivalent AVAudioSessionCategoryRecord) category."
If you have it se to any other Audio Session category it will not work
Upvotes: 1