SoundProcessor Class Reference

AssetProcessor for processing sounds in an AssetGroup. In order to properly reload a sound from an asset group the class that uses the sound needs to implement a event method for the "sounds/<filename>" event. When the sound is reloaded a event will be emitted to the appropriate slot with the new sound as the parameter. See SoundSourceComponent::onSound for an example. More...

Inheritance diagram for SoundProcessor:

Inheritance graph
[legend]
Collaboration diagram for SoundProcessor:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 SoundProcessor (AssetGroup *parent)
 Constructor.
 ~SoundProcessor ()
 Deconstructor.
bool getSound (const std::string &fileName, c8 *&buffer, long &length)
 Gets the sound with the given filename as memory.
bool reloadAsset (const std::string &fileName)
 Reloads the asset with the given filename.
void reloadAssets ()
 Reloads all assets.
bool removeAsset (const std::string &fileName)
 Removes the asset with the given filename.
void removeAssets ()
 Removes all assets.

Static Public Member Functions

static AssetProcessorcreateProcessor (AssetGroup *parent)
 Creates a new SoundProcessor.

Protected Member Functions

bool loadAsset (const std::string &fileName)
 Loads the asset with the given filename.
void loadAssets ()
 Loads all assets.


Detailed Description

AssetProcessor for processing sounds in an AssetGroup. In order to properly reload a sound from an asset group the class that uses the sound needs to implement a event method for the "sounds/<filename>" event. When the sound is reloaded a event will be emitted to the appropriate slot with the new sound as the parameter. See SoundSourceComponent::onSound for an example.

Definition at line 33 of file SoundProcessor.h.


Constructor & Destructor Documentation

SoundProcessor::SoundProcessor ( AssetGroup parent  ) 

Constructor.

Definition at line 26 of file SoundProcessor.cpp.

SoundProcessor::~SoundProcessor (  ) 

Deconstructor.

Definition at line 32 of file SoundProcessor.cpp.


Member Function Documentation

AssetProcessor * SoundProcessor::createProcessor ( AssetGroup parent  )  [static]

Creates a new SoundProcessor.

Note:
For internal use only!

Definition at line 238 of file SoundProcessor.cpp.

bool SoundProcessor::getSound ( const std::string &  fileName,
c8 *&  buffer,
long &  length 
)

Gets the sound with the given filename as memory.

Parameters:
fileName Filename of the sound.
buffer A pointer to the start of the sound buffer.
length Length of the buffer.
Returns:
True on success, false on failure.

Definition at line 38 of file SoundProcessor.cpp.

bool SoundProcessor::loadAsset ( const std::string &  fileName  )  [protected, virtual]

Loads the asset with the given filename.

Parameters:
fileName Filename of the asset.
Returns:
True on succesful loading, false otherwise.

Reimplemented from AssetProcessor.

Definition at line 53 of file SoundProcessor.cpp.

void SoundProcessor::loadAssets (  )  [protected, virtual]

Loads all assets.

Reimplemented from AssetProcessor.

Definition at line 99 of file SoundProcessor.cpp.

bool SoundProcessor::reloadAsset ( const std::string &  fileName  )  [virtual]

Reloads the asset with the given filename.

Parameters:
fileName Filename of the asset.
Returns:
True on succesful removal, false otherwise.

Reimplemented from AssetProcessor.

Definition at line 157 of file SoundProcessor.cpp.

void SoundProcessor::reloadAssets (  )  [virtual]

Reloads all assets.

Reimplemented from AssetProcessor.

Definition at line 170 of file SoundProcessor.cpp.

bool SoundProcessor::removeAsset ( const std::string &  fileName  )  [virtual]

Removes the asset with the given filename.

Parameters:
fileName Filename of the asset.
Returns:
True on succesful removal, false otherwise.

Reimplemented from AssetProcessor.

Definition at line 181 of file SoundProcessor.cpp.

void SoundProcessor::removeAssets (  )  [virtual]

Removes all assets.

Reimplemented from AssetProcessor.

Definition at line 212 of file SoundProcessor.cpp.


The documentation for this class was generated from the following files:

Generated on Fri Aug 21 23:55:18 2009 for Sirrf - Simple Irrlicht Framework by  doxygen 1.5.8