[Resolved] Sound playing on headphones but not speakers

Hi,

In the current Corona build I’m finding that audio.play() is playing the sound through the iPhone headphones but not through the speakers if the headphones are unplugged. Has anyone else come across this? Is there any trick with the audio API I need to use?

thanks

paul [import]uid: 43692 topic_id: 25063 reply_id: 325063[/import]

Are you saying audio wont play at all through the speakers, or that if you have the headphones plugged in and then unplug them while the app is running it will not play through the speaker?

Can you tell me if other apps on your phone are doing the same thing? [import]uid: 52491 topic_id: 25063 reply_id: 102071[/import]

I can’t seem to get audio to play via the speakers through any combination. It works on the iPad 1/iOS 5.1 though.

Other apps seem to be working fine AFAICT. [import]uid: 43692 topic_id: 25063 reply_id: 102635[/import]

What kind of iPhone, what iOS, what build of Corona and, lastly are you using the new or old audio api? (audio.play is new, media.play is old.)

Thanks for any and all info.

Peach :slight_smile:
[import]uid: 52491 topic_id: 25063 reply_id: 102754[/import]

Hi, here’s some info:

iPhone 4
iOS 5.1
Corona 2012.783
The new audio API. [import]uid: 43692 topic_id: 25063 reply_id: 103084[/import]

Hey again Paul.

Could you please file a bug report including that info?

I have not been able to reproduce it but I don’t have access to my iPhone 4 today, only a 3GS.

If you can do that and let me know the bug # I can bring it up in our next meeting.

Peach :slight_smile: [import]uid: 52491 topic_id: 25063 reply_id: 103236[/import]

you figured this out right? ipad ships with default setting of the hardware toggle switch for audio muting.

just turn it off, or change it to lock rotation instead of audio [import]uid: 121083 topic_id: 25063 reply_id: 113457[/import]

any news on this?
struggling with a similiar issue here. [import]uid: 123238 topic_id: 25063 reply_id: 114374[/import]

@Paulo - Are you docking the device? Have you checked your settings? Have you checked other apps? [import]uid: 52491 topic_id: 25063 reply_id: 114443[/import]

Not Docked.
But all working now :slight_smile: [import]uid: 123238 topic_id: 25063 reply_id: 114474[/import]

Are you able to post what you did to make it work, please? (Others have clearly had this issue too.) [import]uid: 52491 topic_id: 25063 reply_id: 114573[/import]

the most likely culprit is that ipads ship from the factory with the side switch set to mute, rather than lock rotation.

if you are experiencing this issue, try unlocking the side switch (right next to volume control)

to change the setting:
settings > general > use side switch to: > (change to lock rotation instead of mute)

picture of side switch:
http://heresthethingblog.com/wp-content/uploads/2012/05/How-to-change-what-the-iPad-side-switch-does.jpg
[import]uid: 121083 topic_id: 25063 reply_id: 114618[/import]

That’s a very thorough explanation, hopefully it helps some people in the future - thank you Doug :slight_smile: [import]uid: 52491 topic_id: 25063 reply_id: 114654[/import]

My problem was resolved with this post from ewing:
https://developer.coronalabs.com/forum/2011/06/05/new-audiosession-properties#comment-83047
Probably not the same issue as this post, but it worked for me :slight_smile: [import]uid: 123238 topic_id: 25063 reply_id: 114721[/import]