Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Sound resume issue

Guest
Dec 07, 2013 Dec 07, 2013

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!

TOPICS
ActionScript
572
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guru ,
Dec 10, 2013 Dec 10, 2013

Native Soundmanagement in Flash is not too reliable.

Use a soundframework like this:

https://github.com/treefortress/SoundAS

for more predictable behaviour

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Dec 10, 2013 Dec 10, 2013
LATEST

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;

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines