audiere::MixerStream Class Reference

#include <device_mixer.h>

Inheritance diagram for audiere::MixerStream:

Inheritance graph
[legend]
Collaboration diagram for audiere::MixerStream:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 MixerStream (MixerDevice *device, SampleSource *source, int rate)
 ~MixerStream ()
void play ()
void stop ()
bool isPlaying ()
void reset ()
void setRepeat (bool repeat)
bool getRepeat ()
void setVolume (float volume)
float getVolume ()
void setPan (float pan)
float getPan ()
void setPitchShift (float shift)
float getPitchShift ()
bool isSeekable ()
int getLength ()
void setPosition (int position)
int getPosition ()

Friends

class MixerDevice

Detailed Description

Definition at line 52 of file device_mixer.h.


Constructor & Destructor Documentation

audiere::MixerStream::MixerStream MixerDevice device,
SampleSource source,
int  rate
 

Definition at line 104 of file device_mixer.cpp.

References audiere::RefPtr< T >::get(), and SYNCHRONIZED.

audiere::MixerStream::~MixerStream  ) 
 

Definition at line 122 of file device_mixer.cpp.

References audiere::RefPtr< T >::get(), and SYNCHRONIZED.


Member Function Documentation

int audiere::MixerStream::getLength  )  [virtual]
 

Returns:
number of frames in the stream, or 0 if the stream is not seekable

Implements audiere::OutputStream.

Definition at line 224 of file device_mixer.cpp.

float audiere::MixerStream::getPan  )  [virtual]
 

Get current pan.

Implements audiere::OutputStream.

Definition at line 197 of file device_mixer.cpp.

References audiere::RefPtr< T >::get(), and SYNCHRONIZED.

float audiere::MixerStream::getPitchShift  )  [virtual]
 

Get current pitch shift. Defaults to 1.0.

Implements audiere::OutputStream.

Definition at line 211 of file device_mixer.cpp.

References audiere::RefPtr< T >::get(), and SYNCHRONIZED.

int audiere::MixerStream::getPosition  )  [virtual]
 

Returns the current position within the sample source.

Returns:
current position in frames

Implements audiere::OutputStream.

Definition at line 237 of file device_mixer.cpp.

References audiere::RefPtr< T >::get(), and SYNCHRONIZED.

bool audiere::MixerStream::getRepeat  )  [virtual]
 

Returns:
true if the stream is repeating

Implements audiere::OutputStream.

Definition at line 169 of file device_mixer.cpp.

References audiere::RefPtr< T >::get(), and SYNCHRONIZED.

float audiere::MixerStream::getVolume  )  [virtual]
 

Gets the current volume.

Returns:
current volume of the output stream

Implements audiere::OutputStream.

Definition at line 183 of file device_mixer.cpp.

References audiere::RefPtr< T >::get(), and SYNCHRONIZED.

bool audiere::MixerStream::isPlaying  )  [virtual]
 

Returns:
true if the output stream is playing, false otherwise

Implements audiere::OutputStream.

Definition at line 148 of file device_mixer.cpp.

References audiere::RefPtr< T >::get(), and SYNCHRONIZED.

bool audiere::MixerStream::isSeekable  )  [virtual]
 

Returns:
true if the stream is seekable, false otherwise

Implements audiere::OutputStream.

Definition at line 218 of file device_mixer.cpp.

void audiere::MixerStream::play  )  [virtual]
 

Start playback of the output stream. If the stream is already playing, this does nothing.

Implements audiere::OutputStream.

Definition at line 129 of file device_mixer.cpp.

References audiere::RefPtr< T >::get(), and SYNCHRONIZED.

void audiere::MixerStream::reset  )  [virtual]
 

Reset the sample source or buffer to the beginning. On seekable streams, this operation is equivalent to setPosition(0).

On some output streams, this operation can be moderately slow, as up to several seconds of PCM buffer must be refilled.

Implements audiere::OutputStream.

Definition at line 155 of file device_mixer.cpp.

References audiere::RefPtr< T >::get(), and SYNCHRONIZED.

void audiere::MixerStream::setPan float  pan  )  [virtual]
 

Set current pan.

Parameters:
pan -1.0 = left, 0.0 = center (default), 1.0 = right

Implements audiere::OutputStream.

Definition at line 190 of file device_mixer.cpp.

References audiere::RefPtr< T >::get(), and SYNCHRONIZED.

void audiere::MixerStream::setPitchShift float  shift  )  [virtual]
 

Set current pitch shift.

Parameters:
shift can range from 0.5 to 2.0. default is 1.0.

Implements audiere::OutputStream.

Definition at line 204 of file device_mixer.cpp.

References audiere::RefPtr< T >::get(), and SYNCHRONIZED.

void audiere::MixerStream::setPosition int  position  )  [virtual]
 

Sets the current position within the sample source. If the stream is not seekable, this method does nothing.

Parameters:
position current position in frames

Implements audiere::OutputStream.

Definition at line 230 of file device_mixer.cpp.

References audiere::RefPtr< T >::get(), and SYNCHRONIZED.

void audiere::MixerStream::setRepeat bool  repeat  )  [virtual]
 

Set whether the output stream should repeat.

Parameters:
repeat true if the stream should repeat, false otherwise

Implements audiere::OutputStream.

Definition at line 162 of file device_mixer.cpp.

References audiere::RefPtr< T >::get(), and SYNCHRONIZED.

void audiere::MixerStream::setVolume float  volume  )  [virtual]
 

Sets the stream's volume.

Parameters:
volume 0.0 = silence, 1.0 = maximum volume (default)

Implements audiere::OutputStream.

Definition at line 176 of file device_mixer.cpp.

References audiere::RefPtr< T >::get(), and SYNCHRONIZED.

void audiere::MixerStream::stop  )  [virtual]
 

Stop playback of the output stream. If the stream is already stopped, this does nothing.

Implements audiere::OutputStream.

Definition at line 136 of file device_mixer.cpp.

References audiere::RefPtr< T >::get(), audiere::StopEvent::STOP_CALLED, and SYNCHRONIZED.


Friends And Related Function Documentation

friend class MixerDevice [friend]
 

Definition at line 89 of file device_mixer.h.


The documentation for this class was generated from the following files:
Generated on Mon Feb 13 23:09:08 2006 for audiere by  doxygen 1.4.6