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

audiere::DSOutputStream Class Reference

#include <device_ds_stream.h>

Inheritance diagram for audiere::DSOutputStream:

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

Collaboration graph
[legend]
List of all members.

Public Methods

 DSOutputStream (DSAudioDevice *device, IDirectSoundBuffer *buffer, int buffer_length, SampleSource *source)
 ~DSOutputStream ()
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 DSAudioDevice

Constructor & Destructor Documentation

audiere::DSOutputStream::DSOutputStream DSAudioDevice   device,
IDirectSoundBuffer *    buffer,
int    buffer_length,
SampleSource   source
 

Definition at line 8 of file device_ds_stream.cpp.

References ADR_GUARD, audiere::SampleSource::getFormat(), audiere::GetSampleSize(), audiere::hidden::sample_format, audiere::SampleFormat, setPan(), and setVolume().

audiere::DSOutputStream::~DSOutputStream  
 

Definition at line 49 of file device_ds_stream.cpp.

References ADR_GUARD.


Member Function Documentation

int audiere::DSOutputStream::getLength   [virtual]
 

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

Implements audiere::OutputStream.

Definition at line 173 of file device_ds_stream.cpp.

References SYNCHRONIZED.

float audiere::DSOutputStream::getPan   [virtual]
 

Get current pan.

Implements audiere::OutputStream.

Definition at line 146 of file device_ds_stream.cpp.

float audiere::DSOutputStream::getPitchShift   [virtual]
 

Get current pitch shift. Defaults to 1.0.

Implements audiere::OutputStream.

Definition at line 158 of file device_ds_stream.cpp.

int audiere::DSOutputStream::getPosition   [virtual]
 

Returns the current position within the sample source.

Returns :
current position in frames

Implements audiere::OutputStream.

Definition at line 208 of file device_ds_stream.cpp.

References SYNCHRONIZED.

bool audiere::DSOutputStream::getRepeat   [virtual]
 

Returns :
true if the stream is repeating

Implements audiere::OutputStream.

Definition at line 119 of file device_ds_stream.cpp.

References SYNCHRONIZED.

float audiere::DSOutputStream::getVolume   [virtual]
 

Gets the current volume.

Returns :
current volume of the output stream

Implements audiere::OutputStream.

Definition at line 133 of file device_ds_stream.cpp.

bool audiere::DSOutputStream::isPlaying   [virtual]
 

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

Implements audiere::OutputStream.

Definition at line 77 of file device_ds_stream.cpp.

Referenced by reset(), and setPosition().

bool audiere::DSOutputStream::isSeekable   [virtual]
 

Returns :
true if the stream is seekable, false otherwise

Implements audiere::OutputStream.

Definition at line 166 of file device_ds_stream.cpp.

References SYNCHRONIZED.

void audiere::DSOutputStream::play   [virtual]
 

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

Implements audiere::OutputStream.

Definition at line 61 of file device_ds_stream.cpp.

References ADR_GUARD.

Referenced by reset(), and setPosition().

void audiere::DSOutputStream::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 83 of file device_ds_stream.cpp.

References ADR_GUARD, isPlaying(), play(), stop(), and SYNCHRONIZED.

void audiere::DSOutputStream::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 139 of file device_ds_stream.cpp.

Referenced by DSOutputStream().

void audiere::DSOutputStream::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 152 of file device_ds_stream.cpp.

void audiere::DSOutputStream::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 180 of file device_ds_stream.cpp.

References isPlaying(), play(), stop(), and SYNCHRONIZED.

void audiere::DSOutputStream::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 112 of file device_ds_stream.cpp.

References SYNCHRONIZED.

void audiere::DSOutputStream::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 126 of file device_ds_stream.cpp.

Referenced by DSOutputStream().

void audiere::DSOutputStream::stop   [virtual]
 

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

Implements audiere::OutputStream.

Definition at line 69 of file device_ds_stream.cpp.

References ADR_GUARD.

Referenced by reset(), and setPosition().


Friends And Related Function Documentation

friend class DSAudioDevice [friend]
 

Definition at line 75 of file device_ds_stream.h.


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