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

audiere::FLACInputStream Class Reference

#include <input_flac.h>

Inheritance diagram for audiere::FLACInputStream:

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

Collaboration graph
[legend]
List of all members.

Public Methods

 FLACInputStream ()
 ~FLACInputStream ()
bool initialize (File *file)
void ADR_CALL getFormat (int &channel_count, int &sample_rate, SampleFormat &sampleformat)
int ADR_CALL read (int frame_count, void *samples)
void ADR_CALL reset ()
bool ADR_CALL isSeekable ()
int ADR_CALL getLength ()
void ADR_CALL setPosition (int position)
int ADR_CALL getPosition ()

Friends

class MyFLACDecoder

Constructor & Destructor Documentation

audiere::FLACInputStream::FLACInputStream  
 

Definition at line 83 of file input_flac.cpp.

References audiere::SF_S16.

audiere::FLACInputStream::~FLACInputStream  
 

Definition at line 95 of file input_flac.cpp.


Member Function Documentation

void audiere::FLACInputStream::getFormat int &    channel_count,
int &    sample_rate,
SampleFormat   sampleformat
[virtual]
 

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

Implements audiere::SampleSource.

Definition at line 145 of file input_flac.cpp.

References audiere::hidden::sample_format, and audiere::SampleFormat.

int audiere::FLACInputStream::getLength   [virtual]
 

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

Implements audiere::SampleSource.

Definition at line 207 of file input_flac.cpp.

int audiere::FLACInputStream::getPosition   [virtual]
 

Returns the current position within the sample source.

Returns :
current position in frames

Implements audiere::SampleSource.

Definition at line 221 of file input_flac.cpp.

References audiere::GetSampleSize(), and audiere::QueueBuffer::getSize().

bool audiere::FLACInputStream::initialize File   file
 

Definition at line 101 of file input_flac.cpp.

References MyFLACDecoder, audiere::SF_S16, and audiere::SF_U8.

bool audiere::FLACInputStream::isSeekable   [virtual]
 

Returns :
true if the stream is seekable, false otherwise

Implements audiere::SampleSource.

Definition at line 201 of file input_flac.cpp.

int audiere::FLACInputStream::read int    frame_count,
void *    samples
[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 157 of file input_flac.cpp.

References audiere::GetSampleSize(), audiere::QueueBuffer::getSize(), audiere::QueueBuffer::read(), and audiere::u8.

void audiere::FLACInputStream::reset   [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 192 of file input_flac.cpp.

References audiere::QueueBuffer::clear().

void audiere::FLACInputStream::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::SampleSource.

Definition at line 213 of file input_flac.cpp.


Friends And Related Function Documentation

friend class MyFLACDecoder [friend]
 

Definition at line 60 of file input_flac.h.

Referenced by initialize().


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