Sound.h File Reference

Defines the Sound resource class. More...

#include "Memory/ResourceManager.h"

Classes

class  SoundSample
 The SoundSample resource class. More...
class  SoundStream
 The SoundStream resource class. More...
class  Sound
 The Sound class. More...
class  Music
 The Music class. More...

Functions

bool InitSoundSubSystem ()
 Initializes the sound system (fmod). Call this function once before creating any sounds.
void GetSoundSpectrum (float *spectrum, uint n)
 Gets the frequancy information for all currently playing audio.
SoundSampleRef LoadSoundSampleResource (const char *file, bool useResourcePath=true)
 Loads an SoundSample using the global SoundSampleManager.
SoundStreamRef LoadSoundStreamResource (const char *file, bool useResourcePath=true)
 Loads an SoundStream using the global SoundStreamManager.

Variables

const int SOUND_SPECTRUM_MAX_BUFFER_SIZE = 512

Detailed Description

Defines the Sound resource class.

Author:
Joe Forte
Date:
7/22/2008

Defines the Sound resource class for loading and playing sound effects.


Function Documentation

void GetSoundSpectrum ( float *  spectrum,
uint  n 
)

Gets the frequancy information for all currently playing audio.

Parameters:
[out] spectrum an array of floats that will hold the frequancy data.
[in] n the number of floating point values, should be less then SOUND_SPECTRUM_MAX_BUFFER_SIZE.
bool InitSoundSubSystem (  ) 

Initializes the sound system (fmod). Call this function once before creating any sounds.

Returns:
True if the sound sub system (fmod) was initialized. Returns false if initialization failed. NOTE: Do not create any sounds if false is returned.
SoundSampleRef LoadSoundSampleResource ( const char *  file,
bool  useResourcePath = true 
)

Loads an SoundSample using the global SoundSampleManager.

Parameters:
[in] file the filename of the SoundSample to load assumed to be relative to the 'Sounds' data path.
[in] useResourcePath set to true to use the currently set resource path. Defaults to true.
Returns:
The SoundSampleRef of the loaded SoundSample.

NOTE: This should only be called after the global environment has been initialized.

SoundStreamRef LoadSoundStreamResource ( const char *  file,
bool  useResourcePath = true 
)

Loads an SoundStream using the global SoundStreamManager.

Parameters:
[in] file the filename of the SoundStream to load assumed to be relative to the 'Sounds' data path.
[in] useResourcePath set to true to use the currently set resource path. Defaults to true.
Returns:
The SoundStreamRef of the loaded SoundStream.

NOTE: This should only be called after the global environment has been initialized.


Variable Documentation

The number of elements in the sound spectrum buffer.

Generated on Mon Apr 5 19:08:05 2010 for BrickOut |ReDuX| by  doxygen 1.6.3