ios audio player and *audio API

I didn’t now know its bug or normall work

Step:

  1. play any music with audio player on ios
  2. run app created with corona where use *audio API for example
    local music = audio.loadStream( “some.mp3” )
    audio.play( music , { channel=1, loops=-1 } )

Result:
Music on player stop or pause - on app music play. If close app - music on player play again.
If run app and don’t play music, but use audio.loadStream( “some.mp3” ) - on music player song stop

Expected:
Music on player continue playing [import]uid: 190293 topic_id: 35920 reply_id: 335920[/import]

On iOS audio is handled through Audio Sessions which is a layer between your app and the system.
The default behavior is to silence the audio that’s already playing when your app’s audio starts.

Below you’ll find some links that show ways to manipulate audio sessions in Corona, but they’re quite advanced and Undocumented, Untested and Unsupported. Basically “use at your own risk” :slight_smile:
Maybe fun to experiment with though. It’s a long time ago since I had a look at this, and these links are quite old. I don’t know if they work with the latest builds either.

http://developer.coronalabs.com/forum/2011/06/05/new-audiosession-properties
http://www.coronalabs.com/blog/2011/07/27/the-secretundocumented-audio-apis-in-corona-sdk/

Some other links:
http://developer.coronalabs.com/partner/audionotes
http://developer.apple.com/library/ios/#documentation/Audio/Conceptual/AudioSessionProgrammingGuide/Basics/Basics.html#//apple_ref/doc/uid/TP40007875-CH2-SW1
[import]uid: 70847 topic_id: 35920 reply_id: 142771[/import]

Tthanks for the quick and detailed answer [import]uid: 190293 topic_id: 35920 reply_id: 142840[/import]

On iOS audio is handled through Audio Sessions which is a layer between your app and the system.
The default behavior is to silence the audio that’s already playing when your app’s audio starts.

Below you’ll find some links that show ways to manipulate audio sessions in Corona, but they’re quite advanced and Undocumented, Untested and Unsupported. Basically “use at your own risk” :slight_smile:
Maybe fun to experiment with though. It’s a long time ago since I had a look at this, and these links are quite old. I don’t know if they work with the latest builds either.

http://developer.coronalabs.com/forum/2011/06/05/new-audiosession-properties
http://www.coronalabs.com/blog/2011/07/27/the-secretundocumented-audio-apis-in-corona-sdk/

Some other links:
http://developer.coronalabs.com/partner/audionotes
http://developer.apple.com/library/ios/#documentation/Audio/Conceptual/AudioSessionProgrammingGuide/Basics/Basics.html#//apple_ref/doc/uid/TP40007875-CH2-SW1
[import]uid: 70847 topic_id: 35920 reply_id: 142771[/import]

Tthanks for the quick and detailed answer [import]uid: 190293 topic_id: 35920 reply_id: 142840[/import]

On iOS audio is handled through Audio Sessions which is a layer between your app and the system.
The default behavior is to silence the audio that’s already playing when your app’s audio starts.

Below you’ll find some links that show ways to manipulate audio sessions in Corona, but they’re quite advanced and Undocumented, Untested and Unsupported. Basically “use at your own risk” :slight_smile:
Maybe fun to experiment with though. It’s a long time ago since I had a look at this, and these links are quite old. I don’t know if they work with the latest builds either.

http://developer.coronalabs.com/forum/2011/06/05/new-audiosession-properties
http://www.coronalabs.com/blog/2011/07/27/the-secretundocumented-audio-apis-in-corona-sdk/

Some other links:
http://developer.coronalabs.com/partner/audionotes
http://developer.apple.com/library/ios/#documentation/Audio/Conceptual/AudioSessionProgrammingGuide/Basics/Basics.html#//apple_ref/doc/uid/TP40007875-CH2-SW1
[import]uid: 70847 topic_id: 35920 reply_id: 142771[/import]

Tthanks for the quick and detailed answer [import]uid: 190293 topic_id: 35920 reply_id: 142840[/import]

On iOS audio is handled through Audio Sessions which is a layer between your app and the system.
The default behavior is to silence the audio that’s already playing when your app’s audio starts.

Below you’ll find some links that show ways to manipulate audio sessions in Corona, but they’re quite advanced and Undocumented, Untested and Unsupported. Basically “use at your own risk” :slight_smile:
Maybe fun to experiment with though. It’s a long time ago since I had a look at this, and these links are quite old. I don’t know if they work with the latest builds either.

http://developer.coronalabs.com/forum/2011/06/05/new-audiosession-properties
http://www.coronalabs.com/blog/2011/07/27/the-secretundocumented-audio-apis-in-corona-sdk/

Some other links:
http://developer.coronalabs.com/partner/audionotes
http://developer.apple.com/library/ios/#documentation/Audio/Conceptual/AudioSessionProgrammingGuide/Basics/Basics.html#//apple_ref/doc/uid/TP40007875-CH2-SW1
[import]uid: 70847 topic_id: 35920 reply_id: 142771[/import]

Tthanks for the quick and detailed answer [import]uid: 190293 topic_id: 35920 reply_id: 142840[/import]