Audio Framework Question: How to disable it after having loaded and finished up with a sound?

Hey guys I just started playing with the audio framework and I’ve been trying to figure this out. Basically after calling

[lua]local warningSound = audio.loadSound(“Basso.aiff”)[/lua]

playing it a few times throughout the code and then calling

[lua]audio.dispose(warningSound)
warningSound = nil[/lua]

after the user has terminated the session and switched screens, I’ve noticed that when changing the volume it does not go back to displaying “ringer.” At the start of the application before the audio is loaded I’ve noticed that changing the volume adjusts the “ringer.” Is there a way to revert back to this after the audio in the application has been unloaded? Thanks guys! [import]uid: 85128 topic_id: 25892 reply_id: 325892[/import]

I don’t know what you mean by displaying the “ringer”. Are you talking about iOS or Android?

On iOS, the audio API does not affect the main (ringer) volume in any way. (It is impossible to programmatically change the user’s main volume.)

On Android, I think the visual overlay to show the volume level is drawn by Corona. I don’t remember if the audio API can change the main (ringer) volume, but I don’t think it does.

[import]uid: 7563 topic_id: 25892 reply_id: 104767[/import]

I’m referring to iOS. When changing the volume outside of the application or before the audio is loaded the volume display that appears will have “ringer” written on the top (main ringer volume) whereas after the audio is loaded it’ll be blank on top and directly adjust the volume of the application. Basically I’m wondering whether it’s possible to revert back to this “ringer” state after I am done with the sound in the application. Using audio.dispose on all audio files that were loaded and setting the variable to nil do not revert it back to this state.

I’ve noticed that for applications such as Angry Birds Space if the user turns off the sound in the configuration then when adjusting the volume in the application it’ll adjust the main ringer volume. It just makes more sense for my application to bring it back to the main ringer volume adjustment after the user is finished with the portion of the app that requires audio.

Thanks! [import]uid: 85128 topic_id: 25892 reply_id: 104771[/import]

I have never seen the “ringer” string you speak of. I tried to load a bunch of apps on an iPad 3 (iOS 5.1) without audio, and I don’t see that string.

But regardless, as far as I know, there is no way to control this. This is controlled by the OS and this behavior is not documented.
[import]uid: 7563 topic_id: 25892 reply_id: 104773[/import]

Here’s an example.

noRinger

ringer
By toggling sound off in the options the volume dial reverts back to changing the main ringer volume. This is how my application is before audio.loadSound is called. I’m really just looking for a way to turn off the audio to revert back to this state after the user has transitioned out of that portion of my application. Is this not possible?
[import]uid: 85128 topic_id: 25892 reply_id: 104776[/import]

+1 on this. I’m having the exact same issue.

What would be ideal for me is if I could have the audio volume mirror the ringer volume. So when one changes the ringer volume with the volume buttons, it changes the ringer volume AND the app audio volume. My app uses local notifications to sound audio when the app is suspended; it’s an issue when the ringer volume is high and the app volume is low.

+1 on this. I’m having the exact same issue.

What would be ideal for me is if I could have the audio volume mirror the ringer volume. So when one changes the ringer volume with the volume buttons, it changes the ringer volume AND the app audio volume. My app uses local notifications to sound audio when the app is suspended; it’s an issue when the ringer volume is high and the app volume is low.

did you ever find a way to do this? think this might solve a problem I have as well, to totally disable the audio or reset it so its just like before you load/play any sound.

did you ever find a way to do this? think this might solve a problem I have as well, to totally disable the audio or reset it so its just like before you load/play any sound.