Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
Low sound volume on iphone4, iOS 4.3.4? — Gideros Forum

Low sound volume on iphone4, iOS 4.3.4?

pogapoga Member
edited June 2012 in Bugs and issues
Hi all,

I'm working on a game which contain some sound(.mp3 and .wav)
It works pretty well on my iPod touch 4 and Samsung Nexus S.
However, the volume of sounds in my game is extremely low on an iPhone 4, which is running iOS 4.3.4

I've checked some possible causes. The iPhone can play ringtones, movies, any songs correctly without any volume problem.

Does anyone faced this kind of issues before?
Any suggestion on solving it would be appreciated.

FYI, the iPod touch is running iOS 5.1.1

And, here is my code for playing the sound:
-- Main BGM
bgm = Sound.new("se/steppin_out_60loop.mp3"),
bgmChannel = bgm:play(0, 30)
pretty standard i guess?

Thanks,
poga

Comments

  • pogapoga Member
    Another piece of information

    It does really looks like this issue:
    http://stackoverflow.com/questions/4164170/sound-of-app-running-on-iphone-too-low

    I can confirm the low volume sound is played from the speaker for phone calls(sorry, don't know how to call it), instead of the speaker used in playing movies
  • pogapoga Member
    edited June 2012
    Ok, I've found the problem.

    The problem is caused by one of my own gideros plugin with following line.
        [[AVAudioSession sharedInstance] setCategory: AVAudioSessionCategoryPlayAndRecord error: nil];
    It will redirect the output to earspeaker. To fix it, add these two lines after it:
        UInt32 audioRouteOverride = kAudioSessionOverrideAudioRoute_Speaker;
        AudioSessionSetProperty(kAudioSessionProperty_OverrideAudioRoute,sizeof(audioRouteOverride),&audioRouteOverride);
    Sorry for disturbing :)
  • gorkemgorkem Maintainer
    Interested with your plugins - do you mind giving some more information about what they do?
  • pogapoga Member
    It's a simple plugin to detect when a user is blowing into the mic. which is based on Caroline's work I found in this forum. ( Thanks Caroline )

    I've added some function like starting/stoping the NSTimer, Android version of the plugin,... etc

    I will definitely open source it once my project is finished.

    Thanks for providing such a great tool. Helps me a lot. :)
Sign In or Register to comment.