Engine, video player and tools, tools tools!

So these past 2 weeks I’ve been adding some “bits and bytes” to the engine. Taking a rest between some more complex game mechanisms I decided to start doing a video player. After a bit research I decided to choose theora, but a bit skeptic, I’ve used it before on a game company I worked at and I remember being a tiny nightmare, specially because of YUV->RGB(A) conversion and because of video/audio sync. ...

January 29, 2012 · 3 min · 532 words · David Amador

Playing sound using OpenAL

For sound I use OpenAL, it’s free, cross-platform, I’ve managed to get it working on iPhone, Windows and Mac. Setting up OpenAL to play a sound is pretty straight forward, a bit like OpenGL. First you need to create a context. ALCcontext *context; ALCdevice *device; device = alcOpenDevice(NULL, ALC_DEFAULT_DEVICE_SPECIFIER); if (device == NULL) { // Handle Exception } //Create a context context=alcCreateContext(device,NULL); //Set active context alcMakeContextCurrent(context); // Clear Error Code alGetError(); Now for the second part, loading a wav file. You have to open a file, fill buffers with data and then attach it to a source. ...

June 10, 2011 · 2 min · 269 words · David Amador