deSound Class Reference

Sound class. More...

#include <deSound.h>

Inheritance diagram for deSound:
deFileResource deResource deObject

List of all members.

Public Member Functions

Constructors and Destructors
 deSound (deSoundManager *manager, const char *filename, int bytesPerSample, int sampleRate, int sampleCount, int channelCount, bool streaming)
 Creates a new sound object.
virtual ~deSound ()
 Cleans up the sound object.
Management
int GetBytesPerSample () const
 Retrieves the bytes per sample.
int GetSampleCount () const
 Retrieves the number of samples.
int GetChannelCount () const
 Retrieves the number of channels.
char * GetSamples () const
 Retrieves the samples data if non-streaming or NULL if streaming.
int GetSampleRate () const
 Retrieves the sample rate.
float GetPlayTime () const
 Retrieves the play time in seconds.
bool GetStreaming () const
 Determines if the sound source is a streaming sound.
System Peers
deBaseAudioSoundGetAudioSound () const
 Retrieves the audio system peer object.
void SetAudioSound (deBaseAudioSound *audSound)
 Sets the audio system peer object.

Detailed Description

Sound class.

Stores a sound. Sounds are PCM samples used to play short sound effects once or in a loop. Sounds can be placed in scenes with spatial location or in a world or microphone to play directly. Sounds contain also various parameters determining how the sound is played back. The sample data is interleaved if more than one channel is used. The sample count indicates the total number of samples not grouping by channels.

Sounds can be of streaming or non-streaming type. For non-streaming sounds the pcm data is loaded into a memory buffer shared among all speakers using this sound. This is the best choice for small sound files which do not require a lot of memory or are played by many speakers. For streaming sounds there no memory buffer is held. Speakers using this sound use a Sound Decoder object to retrieve the sound data. This is the best choice for large sound files or sound files which are played scarcly and not use in many different speakers at the same time.

Author:
Plüss Roland
Version:
1.0
Date:
2008

Constructor & Destructor Documentation

deSound::deSound ( deSoundManager manager,
const char *  filename,
int  bytesPerSample,
int  sampleRate,
int  sampleCount,
int  channelCount,
bool  streaming 
)

Creates a new sound object.

virtual deSound::~deSound (  ) [virtual]

Cleans up the sound object.


Member Function Documentation

deBaseAudioSound* deSound::GetAudioSound (  ) const [inline]

Retrieves the audio system peer object.

int deSound::GetBytesPerSample (  ) const [inline]

Retrieves the bytes per sample.

int deSound::GetChannelCount (  ) const [inline]

Retrieves the number of channels.

float deSound::GetPlayTime (  ) const [inline]

Retrieves the play time in seconds.

int deSound::GetSampleCount (  ) const [inline]

Retrieves the number of samples.

int deSound::GetSampleRate (  ) const [inline]

Retrieves the sample rate.

char* deSound::GetSamples (  ) const [inline]

Retrieves the samples data if non-streaming or NULL if streaming.

bool deSound::GetStreaming (  ) const [inline]

Determines if the sound source is a streaming sound.

void deSound::SetAudioSound ( deBaseAudioSound audSound )

Sets the audio system peer object.


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