Fundamentals of Audio and Video Programming for Games (Pro-Developer)

In this chapter, you saw the features described in the previous chapters wrapped up into one header file and one class that you can include in your own application. The Concertina framework provides an extensive range of methods to support 3-D sounds, streaming sounds, ambient and random sounds, and EAX 2.0 extensions. The framework makes defining new special effects and I3DL2 or EAX environments a simple issue; you just add the list of settings and an enumeration that identifies them.

One of the main features of the framework is a system that allows you to take a best guess at the number of buffers needed for each sound, and then prints out a report at the end of the program that indicates the actual number of buffers utilized. Each 3-D sound is given an ID, and an overflow area is provided to support those cases where more buffers are required than you guessed. This gives the framework a lot of flexibility.

The framework was tested using a contrived story and a very simple dialog, in order to make the story consist almost entirely of audio output. Although your application may not suit the assumptions that we made in creating this sample code, hopefully it should help you put together your own framework.

The Concertina framework is as far as we are going to take the output of sound in this book, although we cover how to optimize the quality of recorded sound in the third section (see Part Three, Production Quality).

We now leave the world of audio to dive into the realms of video rendering and special effects.

Категории