clear_sound_proc

svn-id: r8414
This commit is contained in:
Chris Apers 2003-06-09 09:48:53 +00:00
parent 0eac9a00cf
commit 5ab796c4de
2 changed files with 22 additions and 1 deletions

View File

@ -1131,6 +1131,7 @@ void OSystem_PALMOS::play_cdrom(int track, int num_loops, int start_frame, int e
if (start_frame == 0 && end_frame == 0) {
MsaPlay(_msaRefNum, _msaTrack, 0, _msaPBRate);
} else {
// MsaTimeToSu doesn't work ...
_msaTrackStart = (UInt32) ((float)_msaStartFrame / ((float)fullLength / (float)SU));
MsaPlay(_msaRefNum, _msaTrack, _msaTrackStart, _msaPBRate);
}
@ -1320,6 +1321,10 @@ bool OSystem_PALMOS::set_sound_proc(SoundProc *proc, void *param, SoundFormat fo
return _sound.active;
}
void OSystem_PALMOS::clear_sound_proc() {
_sound.active = false;
}
void OSystem_PALMOS::check_sound() {
// currently not supported
// but i need to use this function to prevent out of memory

View File

@ -85,8 +85,24 @@ public:
void SimulateArrowKeys(Event *event, Int8 iHoriz, Int8 iVert, Boolean repeat);
// Set function that generates samples
/** @name Sound */
//@{
/**
* Set the audio callback which is invoked whenever samples need to be generated.
* Currently, only the 16-bit signed mode is ever used for Simon & Scumm
* @param proc pointer to the callback.
* @param param an arbitrary parameter which is stored and passed to proc.
* @param format the sample type format.
*/
bool set_sound_proc(SoundProc *proc, void *param, SoundFormat format);
/**
* Remove any audio callback previously set via set_sound_proc, thus effectively
* stopping all audio output immediately.
* @see set_sound_proc
*/
void clear_sound_proc();
//@}
// Poll cdrom status
// Returns true if cd audio is playing