I have a Cocos2D(Box2D) project that contains AVAudioRecorder object (Microphone Listening). I've not problem with audio in iPhone 4, but the audio volume in iPhone 3G is very low! I did increase device volume to the max volume but the audio volume still not changed.
Asked
Active
Viewed 141 times
1 Answers
1
I found the problem! The audio volume is low cause audio played in phone call speaker (not main speaker).
To play audio in main speaker we need this code:
UInt32 doChangeDefaultRoute = 1;
AudioSessionSetProperty(
kAudioSessionProperty_OverrideCategoryDefaultToSpeaker,
sizeof(doChangeDefaultRoute),
&doChangeDefaultRoute
);

Lightness Races in Orbit
- 378,754
- 76
- 643
- 1,055

Younes Jafari
- 251
- 1
- 5
- 17
-
@Vikalp: What grammar was corrected? And we don't need the bold. – Lightness Races in Orbit Feb 02 '13 at 12:05