#include <AudioStream.h>
Definition at line 40 of file AudioStream.h.
Public Member Functions | |
AudioStream (const char *filename, uint32 speakers, bool mono=true, bool looped=false) | |
Creates a new stream. | |
~AudioStream (void) | |
Destroys this stream. | |
void | Play (bool restart=false) |
Starts (or resumes) playback of this stream. | |
void | Pause (void) |
Pauses this sample. | |
void | Stop (void) |
Stops this sample. | |
uint64 | GetSize (void) |
Retrieves the size of the channel in bytes. | |
int | GetLength (void) |
Retrieves the length of the stream in seconds. | |
float | GetTimeRemaining (void) |
Retrieves the remaining time in seconds. | |
float | GetTimeElapsed (void) |
Retrieves the elapsed time in seconds. | |
void | SetPosition (float sec) |
Sets the position of the stream. | |
void | SetSpekears (uint32 speakers) |
Assigns this stream to speakers. | |
void | SetFrequency (uint32 freq) |
Sets the sample rate (frequency) of this stream. | |
uint32 | GetFrequency (void) |
Retrieves the sample rate of this stream. | |
void | SetVolume (uint16 vol) |
Sets the volume. | |
uint16 | GetVolume (void) |
Retrieves the volume. | |
void | SetPanning (sint8 pan) |
Sets the panning position. | |
sint8 | GetPanning (void) |
Retrieves the panning position. | |
void | PrintChannelAttributes (void) |
AudioStream::AudioStream | ( | const char * | filename, | |
uint32 | speakers, | |||
bool | mono = true , |
|||
bool | looped = false | |||
) |
Creates a new stream.
filename | location in filesystem. | |
speakers | speakers (see SPEAKER(N) macro). | |
mono | play the stream in mono. | |
looped | loop the file. |
Definition at line 36 of file AudioStream.cpp.
AudioStream::~AudioStream | ( | void | ) |
uint32 AudioStream::GetFrequency | ( | void | ) |
int AudioStream::GetLength | ( | void | ) |
sint8 AudioStream::GetPanning | ( | void | ) |
uint64 AudioStream::GetSize | ( | void | ) |
float AudioStream::GetTimeElapsed | ( | void | ) |
float AudioStream::GetTimeRemaining | ( | void | ) |
uint16 AudioStream::GetVolume | ( | void | ) |
void AudioStream::Pause | ( | void | ) |
void AudioStream::Play | ( | bool | restart = false |
) |
Starts (or resumes) playback of this stream.
restart | true if you want to restart playback from the beginning (the default value is false). |
Definition at line 95 of file AudioStream.cpp.
void AudioStream::PrintChannelAttributes | ( | void | ) |
Definition at line 209 of file AudioStream.cpp.
void AudioStream::SetFrequency | ( | uint32 | freq | ) |
Sets the sample rate (frequency) of this stream.
freq | the sample rate of this stream. |
Definition at line 164 of file AudioStream.cpp.
void AudioStream::SetPanning | ( | sint8 | pan | ) |
Sets the panning position.
pan | the panning position (-100 - 100) |
Definition at line 194 of file AudioStream.cpp.
void AudioStream::SetPosition | ( | float | sec | ) |
Sets the position of the stream.
sec | the position is seconds. |
Definition at line 145 of file AudioStream.cpp.
void AudioStream::SetSpekears | ( | uint32 | speakers | ) |
Assigns this stream to speakers.
speakers | the assigned speakers. |
Definition at line 154 of file AudioStream.cpp.
void AudioStream::SetVolume | ( | uint16 | vol | ) |
Sets the volume.
vol | the volume (0 - 10000) |
Definition at line 179 of file AudioStream.cpp.
void AudioStream::Stop | ( | void | ) |