Public Member Functions | Protected Attributes | Friends

alize::AudioInputStream Class Reference

#include <AudioInputStream.h>

Inheritance diagram for alize::AudioInputStream:
Inheritance graph
[legend]
Collaboration diagram for alize::AudioInputStream:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 AudioInputStream (unsigned long selectedChannel)
virtual void reset ()=0
virtual ~AudioInputStream ()
virtual bool readFrame (AudioFrame &f)=0
virtual void seekFrame (unsigned long n)=0
virtual unsigned long getFrameCount ()=0
virtual unsigned long getChannelCount ()=0
virtual unsigned long getSampleBytes ()=0
virtual double getFrameRate ()=0
virtual unsigned long getSelectedChannel () const
virtual void setSelectedChannel (unsigned long c)
virtual void close ()=0
virtual unsigned long getSourceCount ()=0

Protected Attributes

unsigned long _selectedChannel

Friends

class TestAudioFileReader

Detailed Description

This class is the abstract class for audio data stream.

Author:
Frederic Wils frederic.wils@lia.univ-avignon.fr
Version:
1.0
Date:
2004

Definition at line 81 of file AudioInputStream.h.


Constructor & Destructor Documentation

alize::AudioInputStream::AudioInputStream ( unsigned long  selectedChannel ) [explicit]
virtual alize::AudioInputStream::~AudioInputStream (  ) [virtual]

Member Function Documentation

virtual void alize::AudioInputStream::close (  ) [pure virtual]

Closes the stream

Implemented in alize::AudioFileReader.

virtual unsigned long alize::AudioInputStream::getChannelCount (  ) [pure virtual]

Returns the channel count of the file

Returns:
the channel count of the file

Implemented in alize::AudioFileReader.

virtual unsigned long alize::AudioInputStream::getFrameCount (  ) [pure virtual]

Returns the frame count of the file

Returns:
the frame count of the file

Implemented in alize::AudioFileReader.

virtual double alize::AudioInputStream::getFrameRate (  ) [pure virtual]

Returns the frame rate in Hz

Returns:
the frame rate in Hz

Implemented in alize::AudioFileReader.

virtual unsigned long alize::AudioInputStream::getSampleBytes (  ) [pure virtual]

Returns the size of a sample (for one channel) : 8, 16...

Returns:
the size of a sample (for one channel) : 8, 16...

Implemented in alize::AudioFileReader.

virtual unsigned long alize::AudioInputStream::getSelectedChannel (  ) const [virtual]

Returns the selected channel number

Returns:
the selected channel number

Referenced by alize::AudioFileReader::toString().

virtual unsigned long alize::AudioInputStream::getSourceCount (  ) [pure virtual]

Implemented in alize::AudioFileReader.

virtual bool alize::AudioInputStream::readFrame ( AudioFrame f ) [pure virtual]

Reads the next available audio frame
Reads a unique channel. See method setSelectedChannel(...) to choose a channel

Parameters:
fthe audio frame object to store the data
Returns:
false if there is no more data because the end of the file has been reached
Exceptions:
IOExceptionif an I/O error occurs

Implemented in alize::AudioFileReader.

virtual void alize::AudioInputStream::reset (  ) [pure virtual]

Resets the stream

Implemented in alize::AudioFileReader.

virtual void alize::AudioInputStream::seekFrame ( unsigned long  n ) [pure virtual]

Sets the position indicator associated with the stream to a new position. Does not throw any exception or error if the position exceeds file length

Parameters:
posposition of the next frame to read

Implemented in alize::AudioFileReader.

virtual void alize::AudioInputStream::setSelectedChannel ( unsigned long  c ) [virtual]

Sets the channel to read

Parameters:
cthe channel number

Friends And Related Function Documentation

friend class TestAudioFileReader [friend]

Reimplemented in alize::AudioFileReader.

Definition at line 83 of file AudioInputStream.h.


Member Data Documentation

unsigned long alize::AudioInputStream::_selectedChannel [protected]

Definition at line 150 of file AudioInputStream.h.


The documentation for this class was generated from the following file: