Search code examples
actionscript-3flashairogg

How to play .ogg files in Adobe AIR app?


I've been looking for a way to play sound files in .ogg format inside an Adobe AIR app. All information that I found while searhing for about an hour leads to this link which no longer works: http://labs.adobe.com/wiki/index.php/Alchemy:Libraries

Any suggestions on how to play .ogg files? Or, can you recommend another free (unlike the mp3) format that can be relatively easily encoded and played inside an AIR mobile app?

Thanks!


Solution

  • I found two possibilities:

    1.OggLibrary

    Sample:

    [Embed(source="/test.ogg",mimeType="application/octet-stream")] 
    private static const OGG_TEST:Class
    
    public function test()
    {
       var oggTest:OggEmbed = new OggEmbed(new OGG_TEST() as ByteArray);
       oggTest.play(0);
    }
    

    2.Ogg Vorbis Encoder + Decoder for Flash

    It seems there aren't ANE ready to play *.ogg (at least I wasn't able to find them).