﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	i_links	o_links
19	Implementing SoundEngine	patrick	simon	"Interface to the sound card. You will use the SDL-Mixer and eventually some other libraries to decode compressed sound-files.

 * requirements:
   * playing background music
   * managing a list of background music sounds, they can be played in this queue
   * playing game sound-effects with a minimal delay
   * playing sound/music with individual sound volumes
   * use of compressed music/sound like mp3, ogg
   * setting the background music volume and the sound effect volume indipendently
   * fading away background music
   * bonus: mixing two music tracks

 * implementation:
   * SoundEngine is a singleton class
   * attribute: background sound-queue, containing all background sounds (List)
   * init() function, that initializes and starts all SDL sound modules
   * uninit() function, that free the SDL sound modules
   * destroy() frees all resources
   * playBackSoundList() function, to start playing the background music queue
   * playBackSoundList(int tracNr) function to play a specific backsound in the list given as a number
   * playBackSoundLoop(Sound* background) function to start playing the list one by one
   * stopBackSound() function, to stop playing the background music
   * pauseBackSound() function, to pause the background music
   * playEffectSound(Sound* effect, float volume) function to play effect sound with individual effect volume
   * playEffectSound(Sound* effect) function to play effect sound
   * addBackSound() adds a back-sound to the internal queue
   * removeBackSound() removes a back-sound from the internal queue
   * clearBackSound() clears the back-sound list
   * setBackVolume(float) [0, 1] function to set the background volume, values between [0,1]
   * setEffectVolume(float) [0, 1] function to set the sound effect volume, values between [0,1]

 * what you have to think about:
   * sounds happening far away (explosions etc) should have a lower volume, is this possilbe?
   * sound format to use, we prefere open source formats, keep this in mind

 * proposed work flow:
   1. read some stuff on the internet about this topics, namly:
      * SDL_mixer, sound channels, mixer, volumes, supported sound formats, performance needs
      * mp3, ogg, wav sound formats and other you might find
   2. look at some examples on the net and make your own. develop a test environment that comes close to the requirements
   3. implement the framework for the SoundEngine, just the function bodies
   4. make some short doxygen tags. you can use the short descriptions i made under ''implementation''
   5. implement the SoundEngine
   6. test it, also on the other computer platforms
"	defect	closed	minor	0.3.0-pre-alpha orx-v0	Sound		fixed		bensch		
