SoundStream Class Reference

The SoundStream resource class. More...

#include <Sound/Font.h>

Inherits Resource< ForceNoResourceSharing >.

List of all members.

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.

Detailed Description

The SoundStream resource class.

An unsharable mutable resource type that is used for streaming and playing music files. The following sound formats are supported:

  1. WAV
  2. MP2
  3. MP3
  4. OGG
  5. RAW

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.


Member Function Documentation

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.

Parameters:
[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.

Returns:
The new sound value between 0 (silent) and 255 (unneccecarily load).
bool SoundStream::IsPlaying (  ) 

Determines if the sound is currently playing.

Returns:
True if the sound is playing, false otherwise.
void SoundStream::SetVolume ( byte  newVol  ) 

Sets the volume of the Stream.

Parameters:
[in] newVol the new volume between 0 (silent) and 255 (unneccessarily load).

The documentation for this class was generated from the following files:
Generated on Mon Apr 5 19:08:06 2010 for BrickOut |ReDuX| by  doxygen 1.6.3