4 Replies Latest reply: Jun 7, 2012 11:32 PM by kshi.gupta RSS

    Sound delay and Air 3.3

    yannrayon

      Anyone tried this yet ?

       

      I'm still having too much delay for the sound.play() method in air3.3 for android

      It seems better when used in the simulatr but not on the device.

       

      Let's share our experiences.

        • 1. Re: Sound delay and Air 3.3
          Li_

          I'm observind the same here in Android and iOS, the Sound API has a clear delay.

          • 2. Re: Sound delay and Air 3.3
            mpgopala

            Hi,

                            Can you please provide more details about the delay? Is it improved compared to the previous version? Is it the same? On what devices are you observing the delays? Details on these and the OS details you are using on the devices would be of great help.

            Thanks and Regards,

            Gopala

            • 3. Re: Sound delay and Air 3.3
              Li_ Community Member

              Hi, sure.

               

              My code is the simplest way you can use the Sound API to play an mp3.

               

              On init:

              _sound = new OuchSound() as Sound;

              And then every time a button is pressed:

              _sound.play();

               

              The sound's data does not have an inherent delay, i.e. its attack is before

              the first 50ms.

               

              On a Mac desktop, there is no noticeable delay. Using Flex 4.6 to compile

              to both Android and iOS shows signifficant delay. On both devices, I can

              hear my finger tap the screen and then the sound trigger at about 500ms

              delay. The latency is even more noticeable in Android.

               

              I think that this is a serious bug that needs to be addressed seriously if

              Adobe really want to focus on gaming. I imagine tho that it should be

              pretty simple to fix, just nobody pays attention to it and often forget the

              importance of audio in gaming. Its not all about graphics...

               

              Cheers,

              Li

              • 4. Re: Sound delay and Air 3.3
                kshi.gupta Adobe Employee

                It may help if you have uncompressed format for playing sound. Also try to keep the frequency of your audio file to 44.1 kHz. Runtime does not need to resample the audio if it is already at 44.1 Khz.