#include <mixer.h>
Collaboration diagram for mixer:
Public Methods | |
mixer () throw () | |
int | get_frequency () const throw () |
virtual | ~mixer () throw () |
bool | init (sound_renderer *out, int freq, int size) throw () |
mixer initialisation | |
channel * | find_channel (int track) throw () |
channel lookup | |
bool | add_channel (int track, channel *c) throw (std::exception) |
add a channel to the mixer | |
bool | handle_frame () throw (std::exception) |
performing mixing for a frame of the animation | |
bool | stop () throw (std::exception) |
stop the mixer | |
Private Attributes | |
std::map< int, channel * > | _channels |
The map of track and channels. | |
int | _frequency |
The mixer's frequency. | |
short * | _sound |
Internal mixed sound buffer. | |
sound_renderer * | _out |
The sound renderer to send mixed sound data to. |
This class is used for sound mixing. It contains a list of current track and request them to mix. It then sends the mixed sound samples to the sound renderer.
Definition at line 51 of file mixer.h.
|
|
|
|
|
add a channel to the mixer This method allow to add a channel to the mixer.
|
|
channel lookup This method allow to search for a particular channel, identified by it's track identifier.
|
|
Definition at line 59 of file mixer.h. References _frequency. |
|
performing mixing for a frame of the animation This method request that the mixer generates the sound data for the current frame and send it to the sound renderer.
|
|
mixer initialisation This method initialize the sound mixer.
|
|
stop the mixer
|
|
The map of track and channels.
|
|
The mixer's frequency.
Definition at line 54 of file mixer.h. Referenced by get_frequency(). |
|
The sound renderer to send mixed sound data to.
|
|
Internal mixed sound buffer.
|