audiere::DSOutputBuffer Class Reference

#include <device_ds_buffer.h>

Inheritance diagram for audiere::DSOutputBuffer:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 DSOutputBuffer (DSAudioDevice *device, IDirectSoundBuffer *buffer, int length, int frame_size)
 ~DSOutputBuffer ()
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 DSAudioDevice

Detailed Description

Definition at line 15 of file device_ds_buffer.h.


Constructor & Destructor Documentation

audiere::DSOutputBuffer::DSOutputBuffer DSAudioDevice device,
IDirectSoundBuffer *  buffer,
int  length,
int  frame_size
 

Definition at line 7 of file device_ds_buffer.cpp.

References ADR_GUARD, and ADR_LOG.

audiere::DSOutputBuffer::~DSOutputBuffer  ) 
 

Definition at line 48 of file device_ds_buffer.cpp.

References ADR_GUARD.


Member Function Documentation

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

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

Implements audiere::OutputStream.

Definition at line 149 of file device_ds_buffer.cpp.

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

Get current pan.

Implements audiere::OutputStream.

Definition at line 123 of file device_ds_buffer.cpp.

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

Get current pitch shift. Defaults to 1.0.

Implements audiere::OutputStream.

Definition at line 135 of file device_ds_buffer.cpp.

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

Returns the current position within the sample source.

Returns:
current position in frames

Implements audiere::OutputStream.

Definition at line 161 of file device_ds_buffer.cpp.

References play().

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

Returns:
true if the stream is repeating

Implements audiere::OutputStream.

Definition at line 97 of file device_ds_buffer.cpp.

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

Gets the current volume.

Returns:
current volume of the output stream

Implements audiere::OutputStream.

Definition at line 110 of file device_ds_buffer.cpp.

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

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

Implements audiere::OutputStream.

Definition at line 73 of file device_ds_buffer.cpp.

Referenced by setRepeat().

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

Returns:
true if the stream is seekable, false otherwise

Implements audiere::OutputStream.

Definition at line 143 of file device_ds_buffer.cpp.

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

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

Implements audiere::OutputStream.

Definition at line 60 of file device_ds_buffer.cpp.

Referenced by getPosition(), and setRepeat().

void audiere::DSOutputBuffer::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 81 of file device_ds_buffer.cpp.

References setPosition().

void audiere::DSOutputBuffer::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 116 of file device_ds_buffer.cpp.

References audiere::DSAudioDevice::Pan_AudiereToDirectSound().

void audiere::DSOutputBuffer::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 129 of file device_ds_buffer.cpp.

void audiere::DSOutputBuffer::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 155 of file device_ds_buffer.cpp.

Referenced by reset().

void audiere::DSOutputBuffer::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 87 of file device_ds_buffer.cpp.

References isPlaying(), and play().

void audiere::DSOutputBuffer::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 103 of file device_ds_buffer.cpp.

References audiere::DSAudioDevice::Volume_AudiereToDirectSound().

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

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

Implements audiere::OutputStream.

Definition at line 66 of file device_ds_buffer.cpp.

References audiere::StopEvent::STOP_CALLED.


Friends And Related Function Documentation

friend class DSAudioDevice [friend]
 

Definition at line 62 of file device_ds_buffer.h.


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