AudioStream Class Reference

#include <AudioStream.h>

List of all members.


Detailed Description

Audio stream class.

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)


Constructor & Destructor Documentation

AudioStream::AudioStream ( const char *  filename,
uint32  speakers,
bool  mono = true,
bool  looped = false 
)

Creates a new stream.

Parameters:
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   ) 

Destroys this stream.

Definition at line 56 of file AudioStream.cpp.


Member Function Documentation

uint32 AudioStream::GetFrequency ( void   ) 

Retrieves the sample rate of this stream.

Definition at line 172 of file AudioStream.cpp.

int AudioStream::GetLength ( void   ) 

Retrieves the length of the stream in seconds.

Definition at line 124 of file AudioStream.cpp.

sint8 AudioStream::GetPanning ( void   ) 

Retrieves the panning position.

Definition at line 202 of file AudioStream.cpp.

uint64 AudioStream::GetSize ( void   ) 

Retrieves the size of the channel in bytes.

Definition at line 117 of file AudioStream.cpp.

float AudioStream::GetTimeElapsed ( void   ) 

Retrieves the elapsed time in seconds.

Definition at line 138 of file AudioStream.cpp.

float AudioStream::GetTimeRemaining ( void   ) 

Retrieves the remaining time in seconds.

Definition at line 131 of file AudioStream.cpp.

uint16 AudioStream::GetVolume ( void   ) 

Retrieves the volume.

Definition at line 187 of file AudioStream.cpp.

void AudioStream::Pause ( void   ) 

Pauses this sample.

Definition at line 103 of file AudioStream.cpp.

void AudioStream::Play ( bool  restart = false  ) 

Starts (or resumes) playback of this stream.

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

Parameters:
freq the sample rate of this stream.

Definition at line 164 of file AudioStream.cpp.

void AudioStream::SetPanning ( sint8  pan  ) 

Sets the panning position.

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

Parameters:
sec the position is seconds.

Definition at line 145 of file AudioStream.cpp.

void AudioStream::SetSpekears ( uint32  speakers  ) 

Assigns this stream to speakers.

Parameters:
speakers the assigned speakers.

Definition at line 154 of file AudioStream.cpp.

void AudioStream::SetVolume ( uint16  vol  ) 

Sets the volume.

Parameters:
vol the volume (0 - 10000)

Definition at line 179 of file AudioStream.cpp.

void AudioStream::Stop ( void   ) 

Stops this sample.

Definition at line 110 of file AudioStream.cpp.


The documentation for this class was generated from the following files:
Generated on Tue Oct 16 17:10:51 2007 for Micole by  doxygen 1.4.7