Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

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 Methods

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

Friends

class MixerDevice

Constructor & Destructor Documentation

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

Definition at line 107 of file device_mixer.cpp.

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

audiere::MixerStream::~MixerStream  
 

Definition at line 126 of file device_mixer.cpp.

References audiere::RefPtr< MixerDevice >::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 223 of file device_mixer.cpp.

float audiere::MixerStream::getPan   [virtual]
 

Get current pan.

Implements audiere::OutputStream.

Definition at line 196 of file device_mixer.cpp.

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

float audiere::MixerStream::getPitchShift   [virtual]
 

Get current pitch shift. Defaults to 1.0.

Implements audiere::OutputStream.

Definition at line 210 of file device_mixer.cpp.

References audiere::RefPtr< MixerDevice >::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 236 of file device_mixer.cpp.

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

bool audiere::MixerStream::getRepeat   [virtual]
 

Returns :
true if the stream is repeating

Implements audiere::OutputStream.

Definition at line 168 of file device_mixer.cpp.

References audiere::RefPtr< MixerDevice >::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 182 of file device_mixer.cpp.

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

bool audiere::MixerStream::isPlaying   [virtual]
 

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

Implements audiere::OutputStream.

Definition at line 147 of file device_mixer.cpp.

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

bool audiere::MixerStream::isSeekable   [virtual]
 

Returns :
true if the stream is seekable, false otherwise

Implements audiere::OutputStream.

Definition at line 217 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 133 of file device_mixer.cpp.

References audiere::RefPtr< MixerDevice >::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 154 of file device_mixer.cpp.

References audiere::RefPtr< MixerDevice >::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 189 of file device_mixer.cpp.

References audiere::RefPtr< MixerDevice >::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 203 of file device_mixer.cpp.

References audiere::RefPtr< MixerDevice >::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 229 of file device_mixer.cpp.

References audiere::RefPtr< MixerDevice >::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 161 of file device_mixer.cpp.

References audiere::RefPtr< MixerDevice >::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 175 of file device_mixer.cpp.

References audiere::RefPtr< MixerDevice >::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 140 of file device_mixer.cpp.

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


Friends And Related Function Documentation

friend class MixerDevice [friend]
 

Definition at line 93 of file device_mixer.h.


The documentation for this class was generated from the following files:
Generated on Sat Oct 12 01:44:03 2002 for audiere by doxygen1.2.17