Sound very low on iPhone 4

I’m having a problem specifically with iPhone 4, the sound is really low even at maximum volume. All other devices I tested (iPod, iPad 2, iPad 3) are fine. Other apps on the same iPhone are also fine.
The iPhone has iOS 6.1.3, and I’m using Unity 4.2.0.

Just realized the sound is coming form the upper speaker only, not the bottom ones! This is really weird!
When using earphones works fine also!
Any ideas what this could be?

Did you enable sound recording in Player Settings?

Nop, never did.
Tested today in another iPhone 4 to be sure and the problem also occurs.

Tried different versions of Unity (4.2.1, 4.2.0, 4.1.3 and 4.0), all the same.
Will try a different version of XCode now, but I’m starting to get worried :confused:

The iPhone only has one speaker.

–Eric

There’s one that you use when you receive calls (above the screen) and two on the bottom, where the sound is supposed to come out. The sound is coming out from the one above the scree, therefore it is very very low volume.

One of those “two” is a mic, not a speaker.

–Eric

I ran into this issue when using the microphone (voice chat in my game). Here’s a fix that forces the audio out of the speaker, not the headset: https://github.com/cbaltzer/UnitySpeakerFix

Though, that was written for Unity 4.1, haven’t tested it with 4.2.

cbaltzer is correct. There are some API discrepancies with the iPhone4. For that device, you have to route the audio to the speaker. If you are developing a plugin that uses the audio APIs, this is the code to fix it:

[[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayAndRecord error:nil];
UInt32 audioRouteOverride = kAudioSessionOverrideAudioRoute_Speaker;
AudioSessionSetProperty(kAudioSessionProperty_OverrideAudioRoute,
                        sizeof(audioRouteOverride), &audioRouteOverride);

Just confirming what cbaltzer and u3dxt said, that was the issue :slight_smile:
Thank you everyone!

Hey! I was having same problem, and just solved it, with no software change in Unity 4.6. Just uncheck Prepare iOS for recording in Player Settings.

1 Like

You saved my life ^^