Copy link to clipboard
Copied
Hi everyone!
I have some issue with resuming sound on iOS devices. If I block device while playing my app then unblock it in a short time everything is fine and all sounds in my app resume, but if I wait some minutes while device is blocked, then unblock it and now the sounds doesn`t play, or start to play later after some time left.
To stop the app I use this:
private function deactivate(e:flash.events.Event):void
{
flash.system.System.pause();
Starling.current.stop();
}
private function activate(e:flash.events.Event):void
{
flash.system.System.resume();
Starling.current.start();
}
I also try this to hide only the sound:
private function deactivate(e:flash.events.Event):void
{
SoundMixer.soundTransform = new SoundTransform(0);
}
private function activate(e:flash.events.Event):void
{
SoundMixer.soundTransform = new SoundTransform(1);
}
but it still don`t work (( Hope I could explain my problem! any ideas or advices?
Thanks in advice!
Copy link to clipboard
Copied
Native Soundmanagement in Flash is not too reliable.
Use a soundframework like this:
https://github.com/treefortress/SoundAS
for more predictable behaviour
Copy link to clipboard
Copied
Thanks for your advice moccamaximum ! I`ll try soundframework surely )!
I have already solved this problem (thanks to good people in starling forum )
this property works for me pretty good:
SoundMixer.audioPlaybackMode = AudioPlaybackMode.AMBIENT;
Find more inspiration, events, and resources on the new Adobe Community
Explore Now