5 Replies Latest reply on Aug 13, 2007 7:27 AM by kglad

    Sound class

      I have an mp3 file that can be imported to my library and loaded by Sound.attachSound(), and played back correctly. However, if I use Sound.loadSound( http://..., true). It plays back with scrambled sound. It does not matter if I specify streaming or not, both played back with extremely high pitch scrambled sound. Does anyone have clue why this is the case?

      My sound file is here

      Below is the code I use to load sound
      var mySound: Sound = new Sound();
      mySound.onLoad = function (success:Boolean) {if (success) mySound.start();};
      mySound.loadSound(" http://myplick-test.s3.amazonaws.com/p/fPc6behloBq/01.mp3", true);
        • 1. Re: Sound class
          kglad Adobe Community Professional & MVP
          usually that would be caused by a sound that has a sampling rate not supported by flash (5.5, 8, 11,22,44) but then it shouldn't play correctly when imported, either.

          double check that it plays correctly when imported into your flash library and test in your browser, not the test environment. if it plays ok, re-upload it (using binary protocol) and retry.
          • 2. Sound class
            nehcdet Level 1
            Thanks for the hint. I just tried it with your suggestions. Yes, you're right. It's the sampling rate flash doesn't support, although I'm still not sure why attachSound works for me.

            I'm not very familiar with audio terminologies. If I can convert it, what is the best choice of sampling rate for a 32kbps audio file? Also, is it ok to convert the sampling rate up (e.g. it was originally 16, I converted it to, say, 22)?
            • 3. Re: Sound class
              kglad Adobe Community Professional & MVP
              yes, you can up-sample, but the sound quality won't be improved and file size will increase. down-sampling will decrease sound quality (and file size) so you may want to try up-sampling a 16 to an 22 and down-sample it to an 11 and check the file sizes and sound quality to find the one that works best for you.
              • 4. Re: Sound class
                nehcdet Level 1
                thanks for the answers.
                • 5. Re: Sound class
                  kglad Adobe Community Professional & MVP
                  you're welcome.