Jump to content
Sign in to follow this  
  • entries
  • comment
  • views

Compiling OpenAL, ogg/vorbis and libpng for Android

Sign in to follow this  


Saturday update:

So I've successfully compiled OpenAL-soft, ogg/vorbis decoder and libpng on Android platform. That makes it very cross platform-ish. You can now use the same C++/OpenGL/OpenAL code for iOS, Android, Blackberry, PC, Mac, WebGL etc.

Basic idea is to write custom callbacks for ogg/vorbis and libpng in order to override their default file input system. The custom callbacks redirect file I/O calls from ogg/vorbis and libpng to memory streams.

ogg sound format is open source and patent free. png files are also used almost everywhere in games.

Tiny bit platform specific wrappers have to be written specially for android's weird asset management, but all that has been included in the source code below.

Note: While developing this module I did research on the net and used maybe small amount of GLP3 code somewhere {I think links are given where appropriate}. So please use this code as a study guide ONLY and then maybe write your own for final release.

Try out the android apk:

Download the source code:
Sign in to follow this  


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!