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

audiere::BufferStream Class Reference

Inheritance diagram for audiere::BufferStream:

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

Collaboration graph
[legend]
List of all members.

Public Methods

 BufferStream (SampleBuffer *buffer)
void ADR_CALL getFormat (int &channel_count, int &sample_rate, SampleFormat &sample_format)
int ADR_CALL read (int frame_count, void *buffer)
void ADR_CALL reset ()
bool ADR_CALL isSeekable ()
int ADR_CALL getLength ()
void ADR_CALL setPosition (int position)
int ADR_CALL getPosition ()

Constructor & Destructor Documentation

audiere::BufferStream::BufferStream SampleBuffer   buffer [inline]
 

Definition at line 10 of file sample_buffer.cpp.

References audiere::channel_count, audiere::SampleBuffer::getFormat(), audiere::GetSampleSize(), audiere::hidden::sample_format, audiere::sample_rate, audiere::SampleFormat, and audiere::u8.


Member Function Documentation

void ADR_CALL audiere::BufferStream::getFormat int &    channel_count,
int &    sample_rate,
SampleFormat   sample_format
[inline, virtual]
 

Retrieve the number of channels, sample rate, and sample format of the sample source.

Implements audiere::SampleSource.

Definition at line 26 of file sample_buffer.cpp.

References ADR_CALL, audiere::channel_count, audiere::hidden::sample_format, audiere::sample_rate, and audiere::SampleFormat.

int ADR_CALL audiere::BufferStream::getLength   [inline, virtual]
 

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

Implements audiere::SampleSource.

Definition at line 52 of file sample_buffer.cpp.

References ADR_CALL.

int ADR_CALL audiere::BufferStream::getPosition   [inline, virtual]
 

Returns the current position within the sample source.

Returns :
current position in frames

Implements audiere::SampleSource.

Definition at line 54 of file sample_buffer.cpp.

References ADR_CALL.

bool ADR_CALL audiere::BufferStream::isSeekable   [inline, virtual]
 

Returns :
true if the stream is seekable, false otherwise

Implements audiere::SampleSource.

Definition at line 51 of file sample_buffer.cpp.

References ADR_CALL.

int ADR_CALL audiere::BufferStream::read int    frame_count,
void *    buffer
[inline, virtual]
 

Read frame_count samples into buffer. buffer must be at least |frame_count * GetSampleSize(format) * channel_count| bytes long.

Parameters:
frame_count  number of frames to read
buffer  buffer to store samples in
Returns :
number of frames actually read

Implements audiere::SampleSource.

Definition at line 35 of file sample_buffer.cpp.

References ADR_CALL, and audiere::frame_count.

void ADR_CALL audiere::BufferStream::reset   [inline, virtual]
 

Reset the sample source. This has the same effect as setPosition(0) on a seekable source. On an unseekable source, it resets all internal state to the way it was when the source was first created.

Implements audiere::SampleSource.

Definition at line 46 of file sample_buffer.cpp.

References ADR_CALL.

void ADR_CALL audiere::BufferStream::setPosition int    position [inline, 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::SampleSource.

Definition at line 53 of file sample_buffer.cpp.

References ADR_CALL.


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