OpenAL: an object-oriented approach

in Game Programming, OpenAL

We have already discussed several topics related to OpenAL. This week we will investigate how we can structure the concepts of OpenAL to fit nicely with the object oriented paradigm, so we can write elegant C# code to play sounds and manage sound effects.

In this post we will quickly go over the three main concepts of OpenAL as discussed in my introduction post: listeners, sources, and buffers. In addition, we will also introduce a type for sound data, which comes in handy for sound effect management.

Managing a library of sound effects

in Game Programming, OpenAL

Last time we stepped through the process of loading and playing a sound using OpenAL. In the example we only played a single sound once. In practical applications, in particular games, will have a larger set of sounds they use, and they will be playing these sounds multiple times. They might even play the same sound multiple times simultaneously.

In this post we are going to look at managing a larger set of sound effects.

OpenAL step by step: loading and playing a sound

in OpenAL

In an earlier blog post I introduced the workings of OpenAL. Knowing the theory still doesn’t mean you know how to actually get a sound engine working. Something I found myself struggling with a lot when I started working with OpenAL for our game project was figuring out all the steps required to get a sound to play.

In this blog post I will be talking about the very basics of playing a sound. In the following blog post, I will approach the problem from the other end, and we will look at some of the high level management code that can be used to manage a large amount of sounds.

An introduction to OpenAL in C#

in OpenAL, Technical

Graphics and gameplay are two important pillars to build a game. Audio – both music and sound effects – is another important part of games. Many players and reviewers do not focus on audio much and indeed, if the music and sound effects fit with what is happening on the screen, they will fit naturally in the player’s experience. If you would play a game without audio though, you would immediately feel that something is wrong.

While a lot of game developers – especially programmers – are at least vaguely aware of the workings of an update loop or graphics code, audio is often something that enters the equation at a very late stage. In this post I will introduce the general concepts of basic audio programming using OpenAL.