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

channel Class Reference

interface for a sound channel (a track) More...

#include <channel.h>

Inheritance diagram for channel:

Inheritance graph
[legend]
List of all members.

Public Methods

virtual ~channel () throw ()
virtual bool is_terminated () const=0 throw ()
 is the track terminated ?

virtual bool append_data (chunck &b, int size)=0 throw (std::exception)
 appends coded sound data to the track.

virtual int available_sound_data () const=0 throw ()
 get the number of samples currently available in the channel.

virtual void read_sound_data (short *sound_buffer, int size)=0 throw (std::exception)
 read some sound data from the channel.

virtual bool set_parameters (int, int, int, int)=0 throw (std::exception)
 debugging do not use.

virtual bool check_parameters (int, int, int, int, int)=0 throw (std::exception)
 debugging do not use.


Detailed Description

interface for a sound channel (a track)

This is the interface for sound channels.

Definition at line 46 of file channel.h.


Constructor & Destructor Documentation

virtual channel::~channel   throw () [inline, virtual]
 

Definition at line 48 of file channel.h.


Member Function Documentation

virtual bool channel::append_data chunck   b,
int    size
throw (std::exception) [pure virtual]
 

appends coded sound data to the track.

This method is called by the player from time to time when new data is available for the track.

Parameters:
b  the chunck to read data from.
size  the size of the data to read.
Returns:
true if everything went fine, false otherwise

Implemented in saud_channel, and imuse_channel.

Referenced by player::handleImuseBuffer(), and player::handleSoundBuffer().

virtual int channel::available_sound_data   const throw () [pure virtual]
 

get the number of samples currently available in the channel.

This method is called by the mixer from time to time to get the current number of samples available.

Remarks:
If a track has no more available data, it does not necesseraly means that it is terminated.
Returns:
the number of samples available

Implemented in saud_channel, and imuse_channel.

virtual bool channel::check_parameters int   ,
int   ,
int   ,
int   ,
int   
throw (std::exception) [pure virtual]
 

debugging do not use.

This method is called by player to perform integrity check on the unknown parameters in the chuncks. There is no real other point than to check a few assertions in using this method.

Implemented in saud_channel, and imuse_channel.

Referenced by player::handleImuseBuffer(), and player::handleSoundBuffer().

virtual bool channel::is_terminated   const throw () [pure virtual]
 

is the track terminated ?

This method is called by the mixer from time to time to check if the track is terminated.

Remarks:
If a track has no more available data, it does not necesseraly means that it is terminated.
Returns:
true if the sound channel is terminated, false otherwise

Implemented in saud_channel, and imuse_channel.

virtual void channel::read_sound_data short *    sound_buffer,
int    size
throw (std::exception) [pure virtual]
 

read some sound data from the channel.

This method is called by the mixer from time to time to get the current number of samples available.

Parameters:
sound_buffer  the buffer to write data to.
size  the size of the data to write (in samples).
Remarks:
The sound_buffer may already has been set by another track, so the track should add to it.
Returns:
the number of samples available

Implemented in saud_channel, and imuse_channel.

virtual bool channel::set_parameters int   ,
int   ,
int   ,
int   
throw (std::exception) [pure virtual]
 

debugging do not use.

This method is called by player to perform integrity check on the unknown parameters in the chuncks. There is no real other point than to check a few assertions in using this method.

Implemented in saud_channel, and imuse_channel.

Referenced by player::handleImuseBuffer(), and player::handleSoundBuffer().


The documentation for this class was generated from the following file:
Generated on Fri Aug 9 22:54:30 2002 for san_player by doxygen1.2.16