OpenAL Dropped

One thing that I haven’t been happy with was the audio system in the game. Originally I had decided to use OpenAL. In part because I thought it was going to be as big as OpenGL (not that OpenGL is that big, but it least it is still somewhat backed by NVIDIA and AMD). I also thought it would be more portable. I realize now it’s not. I’m fairly certain there is no PS3 support for OpenAL and I think the 360 support is limited. The PC version is really bad as it is. So I cut out the OpenAL support and rewrote the audio engine in XAudio2. This seemed to be Microsoft’s preferred audio platform for PC and 360.

I’ll tell you this. After dealing with it for two days I’m already very happy with it, and already have about 90% of the functionality in the Emergence engine that I had with the OpenAL engine. By tomorrow it will have exceeded it. XAudio2 actually get’s you closer to the hardware (actually, lack of hardware, since all the mixing is done in software), but it get’s you closer to the software to have more control over it, with easy control over every channel. Further since it is just just software, buffers are literally chunks of memory, I mean direct memory. You allocate memory, that’s your buffer, none of this weird creation of buffers and what-not. You have memory, you have a buffer, and you can feed that buffer to as many voices as you want.

Overall I’m a lot happier with XAudio2. I didn’t even know it existed until yesterday, to be perfectly honest. I actually opened up the DirectX documentation because I thought I needed to refresh my memory on DirectSound, and I was like, ”What’s this? XAudio2, never heard of it”. Well I quickly discovered what it was and how to use it. Really the fundamentals aren’t that different from any other software or hardware mixer, but the implementation seems to be quite good. Plus it is 360 and PC. From a developer standpoint, and some of my colleagues agree, hardware mixing is dead. Processors are so powerful that you can easily get any kind of audio effects that you want. And at this point we have so much memory that special audio effects can be pre-recorded anyway. Still, I’m sure that someone out there is going to argue that hardware will always be better. Well I respond by saying this. A quad core processor has enough cores to take care of any “hardware” argument. Software runs on hardware, after all.