Drag[en]gine Game Engine
1.21
|
Sound resource. More...
#include <deSound.h>
Public Types | |
typedef deTObjectReference< deSound > | Ref |
Type holding strong reference. More... | |
Public Types inherited from deResource | |
typedef deTObjectReference< deResource > | Ref |
Type holding strong reference. More... | |
Public Types inherited from deObject | |
typedef deTObjectReference< deObject > | Ref |
Type holding strong reference. More... | |
Public Member Functions | |
Management | |
int | GetBytesPerSample () const |
Bytes per sample. More... | |
int | GetSampleCount () const |
Number of samples. More... | |
int | GetChannelCount () const |
Number of channels. More... | |
int | GetSampleRate () const |
Sample rate. More... | |
float | GetPlayTime () const |
Play time in seconds. More... | |
System Peers | |
deBaseAudioSound * | GetPeerAudio () const |
Audio system peer object. More... | |
void | SetPeerAudio (deBaseAudioSound *peer) |
Set audio system peer object. More... | |
deBaseSynthesizerSound * | GetPeerSynthesizer () const |
Synthesizer system peer object. More... | |
void | SetPeerSynthesizer (deBaseSynthesizerSound *peer) |
Set synthesizer system peer object. More... | |
Special | |
void | FinalizeConstruction (int bytesPerSample, int sampleRate, int sampleCount, int channelCount) |
Finalize construction after asynchronous loading. More... | |
Public Member Functions inherited from deFileResource | |
deVirtualFileSystem * | GetVirtualFileSystem () const |
Virtual file system or NULL if build from memory. More... | |
const decString & | GetFilename () const |
Filename or empty string if build from memory. More... | |
TIME_SYSTEM | GetModificationTime () const |
Modification time used to detect resources changing on disk while loaded. More... | |
void | SetModificationTime (TIME_SYSTEM modificationTime) |
Set modification time used to detect resources changing on disk while loaded. More... | |
bool | GetAsynchron () const |
Resource is asynchron. More... | |
void | SetAsynchron (bool asynchron) |
Set if resource is asynchron. More... | |
bool | GetOutdated () const |
void | MarkOutdated () |
deFileResource (deFileResourceManager *resourceManager, deVirtualFileSystem *vfs, const char *filename, TIME_SYSTEM modificationTime) | |
Create file resource. More... | |
Public Member Functions inherited from deResource | |
deResourceManager * | GetResourceManager () const |
Resource manager or NULL if resource is leaking. More... | |
deEngine * | GetEngine () const |
Game engine object from resource manager. More... | |
deResource * | GetLLManagerPrev () const |
Previous resource in the resource manager linked list. More... | |
void | SetLLManagerPrev (deResource *resource) |
Set next resource in the resource manager linked list. More... | |
deResource * | GetLLManagerNext () const |
Next resource in the resource manager linked list. More... | |
void | SetLLManagerNext (deResource *resource) |
Set next resource in the resource manager linked list. More... | |
void | MarkLeaking () |
Marks the resource leaking. More... | |
deResource (deResourceManager *resourceManager) | |
Create resource. More... | |
Public Member Functions inherited from deObject | |
int | GetRefCount () const |
Reference count. More... | |
void | AddReference () |
Add reference increasing reference count by 1. More... | |
void | FreeReference () |
Decrease reference count by one and delete object if count reaches 0. More... | |
deObject () | |
Create object with reference count of 1. More... | |
Constructors and Destructors | |
deSound (deSoundManager *manager, deVirtualFileSystem *vfs, const char *filename, TIME_SYSTEM modificationTime, int bytesPerSample, int sampleRate, int sampleCount, int channelCount) | |
Create sound. More... | |
deSound (deSoundManager *manager, deVirtualFileSystem *vfs, const char *filename, TIME_SYSTEM modificationTime) | |
Create sound for internal loading. More... | |
virtual | ~deSound () |
Clean up sound object. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from deFileResource | |
virtual | ~deFileResource () |
Clean up file resource. More... | |
Protected Member Functions inherited from deResource | |
virtual | ~deResource () |
Clean up resource. More... | |
Protected Member Functions inherited from deObject | |
virtual | ~deObject () |
Clean up object. More... | |
Sound resource.
Sounds represent sampled data to play back with speakers or used with synthesizers. Sound resources can be used for short sound effect or long music files. To obtain the samples modules use sound decoders. It is at the discretion of the involved modules if they deem the sound file short enough to cache in memory or if they use the samples in a streaming way.
typedef deTObjectReference<deSound> deSound::Ref |
Type holding strong reference.
deSound::deSound | ( | deSoundManager * | manager, |
deVirtualFileSystem * | vfs, | ||
const char * | filename, | ||
TIME_SYSTEM | modificationTime, | ||
int | bytesPerSample, | ||
int | sampleRate, | ||
int | sampleCount, | ||
int | channelCount | ||
) |
Create sound.
deSound::deSound | ( | deSoundManager * | manager, |
deVirtualFileSystem * | vfs, | ||
const char * | filename, | ||
TIME_SYSTEM | modificationTime | ||
) |
Create sound for internal loading.
|
protectedvirtual |
Clean up sound object.
void deSound::FinalizeConstruction | ( | int | bytesPerSample, |
int | sampleRate, | ||
int | sampleCount, | ||
int | channelCount | ||
) |
Finalize construction after asynchronous loading.
|
inline |
Bytes per sample.
|
inline |
Number of channels.
|
inline |
Audio system peer object.
|
inline |
Synthesizer system peer object.
|
inline |
Play time in seconds.
|
inline |
Number of samples.
|
inline |
Sample rate.
void deSound::SetPeerAudio | ( | deBaseAudioSound * | peer | ) |
Set audio system peer object.
void deSound::SetPeerSynthesizer | ( | deBaseSynthesizerSound * | peer | ) |
Set synthesizer system peer object.