Email Updates RSS Subscribe

This blog is created and maintained by the technical team at Hook in an effort to preserve and share the insights and experience gained during the research and testing phases of our development process. Often, much of this information is lost or hidden once a project is completed. These articles aim to revisit, expand and/or review the concepts that seem worth exploring further. The site also serves as a platform for releasing tools developed internally to help streamline ad development.


Hook is a digital production company that develops interactive content for industry leading agencies and their brands. For more information visit


Alchemy Series Part 6: Ogg Vorbis Library Source Release

Posted on May 3rd, 2011 by Jake

And here we are with the final Ogg Vorbis/Alchemy post (at least for a while). We finally got all of the licensing stuff in order (see the license.txt file, and the comments at the top of the source files) and are ready to release the C source, Yay!

Please Grab The Download Here.

The majority of the C code is from We basically took that, and hacked out the parts that wouldn’t compile through the alchemy/cygwin environment, such as the self tests and some of the macros. We then also forced some of the ifdefs to the correct settings, and reorganized the file structure to make it a bit easier to compile under cygwin. Once that was up and running, we spent the majority of our time building the wrapper C code (hookoggvorbislib.c) and the AS3 interface layer to access that C code. You can check out our Decoder/Encoder post to see how to use the library.

Once you download the source you can go into the alchemy/ogglib folder and check out all of the Alchemy source.
For a quick Cygwin refresher you can check out our other Alchemy Series posts on getting set up:

To compile the library it takes a couple of steps:
1) Open your Cygwin environment and turn on alc with “alc-on”
2) Change the directory to the alchemy/ogglib/lib folder
3) Delete the old object and archive files:./
4) Compile the Xiph lib: ./
5) Archive the lib: ./
6) Move back up a directory level, and link with the wrapper:

cd ..

That should create a brand new .swc for you called hookOggVorbisLib.swc

Most of the concepts used in the wrapper code have been covered through out our Alchemy series and its fairly well commented. So feel free to poke around and see whats up. There is one limitation thus far, seeking is not working properly for the decoding. Of course if you decode the whole file into memory, then you can seek through the bytearray as you see fit. But the seeking to parts of the ogg data, and decoding from there is not working. If someone feels like tackling that let us know :)

In any case, have fun and let us know if you manage to put any of this to good use, we would love to hear about it!

Also remember to like us on Facebook if you want to stay updated, or even just to show your support:

And/Or you can follow me on Twitter:
Follow JakeCallery on Twitter

3 Responses to “Alchemy Series Part 6: Ogg Vorbis Library Source Release”
  1. Jake says:

    unfortunately I don’t know anything about the speex format.
    Good luck.

  2. Thanks for the sources, I’ll be sure to check that out. I find the possibility to “recycle” C code to use it with flex pretty exciting :)

Leave a Reply to Gregory Potdevin

Click here to cancel reply.