The SoundStream resource class. More...
#include <Sound/Font.h>
Inherits Resource< ForceNoResourceSharing >.
Public Member Functions | |
virtual void | Destroy () |
Destroys the resource. | |
virtual uint | GetDataUsageInBytes () const |
Estimates the number of bytes used by the loaded resource. | |
void | SetVolume (byte newVol) |
Sets the volume of the Stream. | |
byte | GetVolume () const |
Gets the volume of the Stream. | |
void | GetLevels (float &left, float &right) |
Gets the current levels of the stream. | |
bool | IsPlaying () |
Determines if the sound is currently playing. | |
void | Play () |
Plays the currently loaded sound. | |
void | Stop () |
Stops playing the sound. | |
void | Pause () |
Pauses playing the sound. The next call to Play will begin at the point Pause was called. |
The SoundStream resource class.
An unsharable mutable resource type that is used for streaming and playing music files. The following sound formats are supported:
NOTE: SoundStreams are not shared by the SoundStreamMgr. The only way to share a SoundStream is by using the SoundStreamRef returned by the SoundStreamMgr. Call LoadResource again will always return a freshly loaded resource.
void SoundStream::Destroy | ( | ) | [virtual] |
Destroys the resource.
Deallocates all data allocated when the resource was loaded. Must be implemented by all classes that inherit from the Resource class but should never be called outside of the ResourceMgr class.
Implements Resource< ForceNoResourceSharing >.
void SoundStream::GetLevels | ( | float & | left, | |
float & | right | |||
) |
Gets the current levels of the stream.
[out] | left | the levels for the left channel. |
[out] | right | the levels for the right channel. |
byte SoundStream::GetVolume | ( | ) | const [inline] |
Gets the volume of the Stream.
bool SoundStream::IsPlaying | ( | ) |
Determines if the sound is currently playing.
void SoundStream::SetVolume | ( | byte | newVol | ) |
Sets the volume of the Stream.
[in] | newVol | the new volume between 0 (silent) and 255 (unneccessarily load). |