Sounds not playing over speaker

Hello,

I tested a game I'm developing with the GameSalad viewer for the first time on an iPhone 3G, 4 and 4S, and on all of these devices the audio doesn't play over the speakers. However, when I plug earbuds into the speaker jack, I can hear the sounds from my game playing just fine. I have not been able to test my game on an iPhone5 yet.

What could be the cause of this and how can I fix it? I'm currently using the Play Sound behavior (playing to completion, loop unchecked, positional sound unchecked) in various rules to get sounds to play when certain events occur.

Comments

  • RPRP Member Posts: 1,990
    Are you certain the ringer/sound lock is not on, on your phones?
    Are you running an adhoc build or via the GameSalad Viewer?
  • galaseagalasea Member Posts: 17
    Yes, I checked the ringer/sound for all of the phones and had their volumes set to maximum. I was using the GameSalad Viewer to test.
  • RPRP Member Posts: 1,990
    I know in that past that there were some issues with sounds and the viewer playback if things were not streamlined in the code that is executing your sound (it can be do to the way the sound was formatted or imported as well).

    To get a real-world test publish out an adhoc build and test it out. If the issue is still occurring make sure EVERYTHING is up-to-date (should be, as typically the viewer would not work otherwise). If the issue is still occurring, hit us back with more details, and/or screenshots of your sound code execution method.
  • beefy_clyrobeefy_clyro Member Posts: 5,394
    If you start a new, blank project and put 1 actor in it with a play sound behaviour, does it come out your speaker?
  • galaseagalasea Member Posts: 17
    "To get a real-world test publish out an adhoc build and test it out. If the issue is still occurring make sure EVERYTHING is up-to-date (should be, as typically the viewer would not work otherwise). If the issue is still occurring, hit us back with more details, and/or screenshots of your sound code execution method."

    Based on RP's suggestion, I tested my game adhoc on an iPhone 3G, 4 and 5 (the 4S I was testing on took off for the holidays), and I am still having the same problem on all of these devices. Nothing is playing over the speaker, but I can hear it all just fine when I plug in ear phones. I'm using the latest version of GS and GS Viewer and the phones have all been updated to either iOS 6.0 or 6.0.1. I checked the phones' audio settings and they are not muted or silent, and they seem to play sounds just fine for other apps over their speakers.

    My game currently doesn't have any music so the only thing I'm using for audio right now is the Play Sound behavior. This occurs in two cases: 1) an actor collides with another actor or 2) touch is pressed and is inside an actor. The settings for this behavior is Volume 1, Pitch 1, No Loop, No Positional Sound, Run to Completion. The sound files are mp3 and wav format.
  • SocksSocks London, UK.Member Posts: 12,822
    edited December 2012
    Forget the game you are working on for the moment, create a simple project with a single button that plays a sound.

    See if you can get this to work on your iPhone/s - and report back !


  • galaseagalasea Member Posts: 17
    OK I created a very simple project with just a single actor playing a sound on loop. Interestingly, it works on the speakers of the 3G and the 4, but not on the 5. I asked the owner of the 5 about it and he says that he has had issues with some apps not playing sounds so I'm not sure if this is a GS thing or just his phone. Will try to find another person with a 5 to test and verify.
  • SocksSocks London, UK.Member Posts: 12,822
    OK I created a very simple project with just a single actor playing a sound on loop. Interestingly, it works on the speakers of the 3G and the 4
    Ok . . . . (putting the iPhone5 aside for a moment) . . . . can you strip your (problematic) project down to just the audio elements that are not playing - better still can you cut and paste the audio code into a new project and then see if that project works ok.



  • So the problem seems to have inexplicably rectified itself, and I'm not sure how. I made a few changes to my program completely unrelated to this issue, and when I tested it on the phones the audio was now working on all of them. Not complaining at all, but I'm a bit baffled because all I changed were some image files, without altering any of the rules or behaviors related to the sounds at all. Anyways, thanks for everyone's help and suggestions!
  • ericpoole27ericpoole27 Member, PRO Posts: 6
    Help! I have this same issue! My music and sound effects only play through the headphones and not the speakers, has anyone figured out why this happens or how to fix it?
Sign In or Register to comment.