#include <channel.h>
Inheritance diagram for imuse_channel:
Public Methods | |
imuse_channel (int track, int freq) throw () | |
virtual | ~imuse_channel () throw () |
bool | is_terminated () const throw () |
is the track terminated ? | |
bool | set_parameters (int nbframes, int size, int unk1, int unk2) throw (std::exception) |
debugging do not use. | |
bool | check_parameters (int index, int nbframes, int size, int unk1, int unk2) throw (std::exception) |
debugging do not use. | |
bool | append_data (chunck &b, int size) throw (std::exception) |
appends coded sound data to the track. | |
int | available_sound_data () const throw () |
get the number of samples currently available in the channel. | |
void | read_sound_data (short *sound_buffer, int size) throw (std::exception) |
read some sound data from the channel. | |
Protected Methods | |
int | resample_mono (int size) throw (std::exception) |
int | resample_stereo (int size) throw (std::exception) |
int | decode (int size, int &) throw (std::exception) |
bool | processBuffer () throw (std::exception) |
bool | handleMap (chunck &) |
bool | handleFormat (chunck &) |
bool | handleText (chunck &) |
bool | handleRegion (chunck &) |
bool | handleStop (chunck &) |
Private Attributes | |
int | _track |
the track number | |
unsigned char * | _buffer |
the buffer that contain the iMUS chunck | |
short * | _decoded_buffer |
a buffer for the decoded sound data | |
short * | _resampled_buffer |
a buffer for the resampled sound data | |
int | _buffer_size |
the size of the iMUS buffer | |
int | _frequency |
the target frequency of the mixer | |
int | _cur_buffer_write_pos |
the current write position in the iMUS buffer | |
int | _cur_buffer_read_pos |
the current read position in the iMUS buffer | |
int | _data_start |
the start of the sound data in the iMUS buffer | |
int | _data_size |
remaining size of sound data in the iMUS buffer | |
int | _size |
int | _nbframes |
int | _unk1 |
int | _unk2 |
int | _index |
int | _bitsize |
the bitsize of the original data | |
int | _rate |
the sampling rate of the original data | |
int | _channels |
the number of channels of the original data | |
int | _imuse_start |
int | _imuse_length |
int | _imuse_stop |
int | _rdata_start |
a copy of _data_start that is not modified by read_sound_data() . Used to save the sound data to a file. | |
int | _rdata_size |
a copy of _data_size that is not modified by read_sound_data() . Used to save the sound data to a file. |
This class implements a channel specifically for The Dig.
Definition at line 178 of file channel.h.
|
Definition at line 258 of file channel.cpp. |
|
Definition at line 272 of file channel.cpp. |
|
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.
Implements channel. Definition at line 338 of file channel.cpp. References from_big_endian(), and chunck::type. |
|
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.
Implements channel. Definition at line 628 of file channel.cpp. |
|
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. Implements channel. Definition at line 313 of file channel.cpp. |
|
Definition at line 535 of file channel.cpp. |
|
Definition at line 370 of file channel.cpp. References _bitsize, _channels, _imuse_start, _rate, from_big_endian(), chunck::get_dword(), chunck::get_size(), and chunck::seek(). Referenced by handleMap(). |
|
Definition at line 426 of file channel.cpp. References chunck::chunck_string(), chunck::eof(), chunck::get_size(), chunck::get_type(), handleFormat(), handleRegion(), handleStop(), handleText(), and chunck::sub_block(). |
|
Definition at line 404 of file channel.cpp. References _imuse_length, _imuse_start, from_big_endian(), chunck::get_dword(), chunck::get_size(), and chunck::seek(). Referenced by handleMap(). |
|
Definition at line 417 of file channel.cpp. References _imuse_length, _imuse_start, _imuse_stop, from_big_endian(), chunck::get_dword(), and chunck::get_size(). Referenced by handleMap(). |
|
Definition at line 388 of file channel.cpp. References _imuse_start, from_big_endian(), chunck::get_dword(), chunck::get_size(), and chunck::read(). Referenced by handleMap(). |
|
is the track terminated ? This method is called by the mixer from time to time to check if the track is terminated.
Implements channel. Definition at line 291 of file channel.cpp. |
|
Definition at line 578 of file channel.cpp. References chunck::chunck_string(), from_big_endian(), and chunck::type. |
|
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.
Implements channel. Definition at line 647 of file channel.cpp. |
|
Definition at line 453 of file channel.cpp. |
|
Definition at line 492 of file channel.cpp. |
|
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. Implements channel. Definition at line 300 of file channel.cpp. |
|
the bitsize of the original data
Definition at line 195 of file channel.h. Referenced by handleFormat(). |
|
the buffer that contain the iMUS chunck
|
|
the size of the iMUS buffer
|
|
the number of channels of the original data
Definition at line 197 of file channel.h. Referenced by handleFormat(). |
|
the current read position in the iMUS buffer
|
|
the current write position in the iMUS buffer
|
|
remaining size of sound data in the iMUS buffer
|
|
the start of the sound data in the iMUS buffer
|
|
a buffer for the decoded sound data
|
|
the target frequency of the mixer
|
|
Definition at line 199 of file channel.h. Referenced by handleRegion(), and handleStop(). |
|
Definition at line 198 of file channel.h. Referenced by handleFormat(), handleRegion(), handleStop(), and handleText(). |
|
Definition at line 200 of file channel.h. Referenced by handleStop(). |
|
|
|
|
|
the sampling rate of the original data
Definition at line 196 of file channel.h. Referenced by handleFormat(). |
|
a copy of
|
|
a copy of
|
|
a buffer for the resampled sound data
|
|
|
|
the track number
|
|
|
|
|