Last modified 4 years ago Last modified on 07/18/08 21:59:10

Sound Architecture

The basic engine needs the following API:

  • Start menu or in-game music.
  • Stop music.
  • Play sound effect.
  • Pause and resume sound effects.
  • Initialize and shut down sound system.

...

We can assume that the OpenAL implementation can handle at least 16 sources at once, and we should try to utilize these slots intelligently according to some sorting criteria. Currently only one type of sound is played simultaneously (eg only one truck is played at once). We want a mix of continuous sounds, such as engines running and oil wells pumping, and one-off sounds such as shots being fired and clicks being made.

Design criteria

  • Sounds must be added to "manageable groups" (e.g. a UI group and a "game" group).
  • These groups must be able to be paused, resumed and stopped independently.
  • Volume control should be manageable for whole groups.
  • Sounds must be contained in a group, if a group is destroyed all sounds in it must be destroyed as well.
  • The UI must always be able to play a single sound.
  • Sounds can be played from preloaded "tracks" (e.g. short sound effects that are used multiple times).
  • Sounds can be streamed directly from the audio file they come from (e.g. large music files that are only played once).

Category:Development ?