Sound Class Reference
[Audio]
List of all members.
Detailed Description
- Author:
- Mattias Gustavsson
Definition at line 20 of file Sound.h.
Constructor & Destructor Documentation
| Sound::Sound |
( |
const Asset & |
asset |
) |
|
Member Function Documentation
| void Sound::Play |
( |
float |
priority = 0, |
|
|
bool |
looping = false | |
|
) |
| | const |
| const void * Sound::GetData |
( |
|
) |
const |
| int Sound::GetChannels |
( |
|
) |
const |
Returns the number of channels this sound is using 1=mono, 2=stereo
Definition at line 59 of file Sound.cpp.
| int Sound::GetFrequency |
( |
|
) |
const |
Returns the frequency of the sound data in number of samples per second
Definition at line 67 of file Sound.cpp.
| int Sound::GetBitsPerSample |
( |
|
) |
const |
Returns the number of bits per sample, normally 8 or 16
Definition at line 75 of file Sound.cpp.
| int Sound::GetSize |
( |
|
) |
const |
Returns the total size (in bytes) of the sound data. To calculate the length of the data in seconds, use this: float length=((float)GetSize())/(float)(GetChannels()*GetFrequency()*GetBitsPerSample())
Definition at line 83 of file Sound.cpp.