Sound.cpp File Reference

Implements the Sound resource class. More...

#include <assert.h>
#include "Common/Globals.h"
#include "Sound/Sound.h"
#include "fmod.h"

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)
 Loads an SoundSample using the global SoundSampleManager.
SoundStreamRef LoadSoundStreamResource (const char *file, bool useResourcePath)
 Loads an SoundStream using the global SoundStreamManager.

Detailed Description

Implements the Sound resource class.

Author:
Joe Forte
Date:
7/22/2008

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.

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