10 Replies Latest reply: Aug 4, 2008 7:47 PM by tedalde2 RSS

    native sound confusion

    tedalde2 Community Member
      I want to put some some native sound in the timeline. I attach a sound event to a keyframe, simple. I apply MP3 Compression with Flash. But the sound won't play (using the Flash device emulator), no error, nothing. I can get it to show an error by using an incorrect (non-MP3) sound format, but no error with an MP3.

      Sound only plays after I use a roundabout method of linking to a device sound (import a sound, go to Properties, and in "Device sound:" link to an MP3 file). It also appears that the MP3 file gets embedded into the SWF and gets re-encoded; the difference in SWF file size with and without the embedded MP3 does not match the MP3 size alone. And I can't affect the size of the SWF by adjusting publishing parameters; embedding/compression seems automatic.

      So what happens to native Flash (MP3) sounds with Flash Lite and BREW? Further, it seems that the Samsung A950 won't accept MP3 as a sound format... it lists PCM... but how to format that? Do I have to use a sound bundle for every single native sound I want to play? Thanks for any help.
        • 1. Re: native sound confusion
          hayden Community Member
          You probably already figured this out, but I dont think BREW supports native audio. It should just ingore the native audio sounds, alteast that is what non native audio platforms like Sony Ericcsson do.

          I was not aware that you can embed a MP3 in a SWF as a device sound. I will test this out later. Does the embedded MP3 play on a BREW phone?

          Anycase, have you tried loading mp3 using the sound class loadSound() method? This would be a better solution than embedding because you can load/unload sound as needed and the sound should not be part of static memory heap because it is not stored in the SWF.
          • 2. Re: native sound confusion
            tedalde2 Community Member
            I'm not a BREW developer, so I can't test on a phone (yet). Native sound works in the emulator with varying degrees of success, depending on the phone and my method of attaching sound. Like you say, it probably requires figuring out the quirks of each "supported" phone... looks like that's what you have to do with Flash Lite. I haven't tried loadSound() yet, but I will, since that would actually work best for me.

            I'm new to Flash Lite. Can you tell me something about testing stuff like this on phones once you're a BREW developer... do you have to generate a signature each time you want to test files on a phone? From what I read, looks like that's the case... but I could rack up 100 signatures in just one day testing something like this.

            • 3. Re: native sound confusion
              punchkickinteractive Community Member
              One test SIG file will work for an unlimited number of applications on ONE handset.
              • 4. Re: native sound confusion
                tedalde2 Community Member
                Thanks. After a little more testing and digging, looks like linking a library sound to a device sound is indeed the only way to go. Help pages for BREW: "All sound formats are passed to the device for playback without modification..." So if the handset supports MP3, it plays MP3, etc. And looks like Flash just packages the linked sound into the SWF without re-encoding (file size differences due to stripping out non-audio data in the MP3 file).

                But I'm still having a problem with AAC (MPEG4) files. Since MP3 isn't supported on the Samsung A950, I thought I'd try AAC. But it throws an error. Perhaps it's the way I encoded the AAC file in QT Pro (the only software I have that will make MPEG4/AAC).

                And it all may be for nothing if none of this works on a real phone... in that case I'll have to dump this project idea. I'd appreciate a test if someone could spare the time... Thanks a lot.

                • 5. Re: native sound confusion
                  tedalde2 Community Member
                  After registering as a BREW developer I got the SDK 3.1 Simulator (figured out there's a difference between being "authenticated" and simply being "registered"). The simulator has 4 generic device profiles, and each lists audio/MP3 as a MIME type in Device Details. But none of them list audio/mp3 in System.capabilities.audioMIMETypes, and do not play MP3 (get "Bad sound data" message). Device-linked MP3 seems to work in the Flash Emulator, though, with the exception of the Samsung A950. And the only audio that seems to work in the Simulator is WAV...

                  So that's as far as I can get hacking away at this. I've come this far... maybe I'll just cough up the $400 and try it on real phones.
                  • 6. Re: native sound confusion
                    hayden Community Member
                    you might post a test file for people to try out for you.
                    • 7. Re: native sound confusion
                      tedalde2 Community Member
                      Yes, right. I have a test file I'll post soon. At least it's encouraging that all the sound I’m testing so far seems to be working “as-advertised”, with the exception of the device-pack MP3 in the Simulator.

                      • 8. Re: native sound confusion
                        tedalde2 Community Member
                        I put together a simple test anyone can see:
                        The zip file contains an FLA and a linked MP3. It works in the Flash emulator, but not in the BREW Simulator using a simple-device-pack. I included the rendered simulator files, too. If anyone can test this with a real device pack or with an actual phone, I'd be grateful. Thanks.
                        • 9. Re: native sound confusion
                          CHAOS'|nc. Community Member
                          The link ain't working.. Please do check it again..
                          • 10. Re: native sound confusion
                            tedalde2 Community Member
                            The link works, it's still there. I've abandoned this project for now, but I never resolved the question. Does the file work on a device?