ScummVM naming conventions and cleanup in the Sword2Sound class.

svn-id: r10514
This commit is contained in:
Torbjörn Andersson 2003-10-01 06:36:25 +00:00
parent 7c04dc7a86
commit 2a41216f08
9 changed files with 423 additions and 486 deletions

View File

@ -563,7 +563,7 @@ void CreateSequenceSpeech(_movieTextObject *sequenceText[]) {
else
strcpy(speechFile, "speech.clu");
sequence_text_list[line].speechBufferSize = g_sound->PreFetchCompSpeech((char *) speechFile, wavId, &sequence_text_list[line].speech_mem);
sequence_text_list[line].speechBufferSize = g_sound->preFetchCompSpeech((char *) speechFile, wavId, &sequence_text_list[line].speech_mem);
if (sequence_text_list[line].speechBufferSize) {
// ok, we've got speech!
speechRunning = 1;
@ -670,14 +670,14 @@ int32 FN_smacker_lead_in(int32 *params) {
leadIn += sizeof(_standardHeader);
// wav data gets copied to sound memory
rv = g_sound->PlayFx(0, leadIn, 0, 0, RDSE_FXLEADIN);
rv = g_sound->playFx(0, leadIn, 0, 0, RDSE_FXLEADIN);
if (rv)
debug(5, "SFX ERROR: PlayFx() returned %.8x", rv);
debug(5, "SFX ERROR: playFx() returned %.8x", rv);
res_man.close(params[0]);
// fade out any music that is currently playing (James22july97)
// fade out any music that is currently playing
FN_stop_music(NULL);
// continue script
@ -750,7 +750,7 @@ int32 FN_play_sequence(int32 *params) {
FN_stop_music(NULL);
// pause sfx during sequence, except the one used for lead-in music
g_sound->PauseFxForSequence();
g_sound->pauseFxForSequence();
if (sequenceTextLines && g_sword2->_gameId == GID_SWORD2)
rv = PlaySmacker(filename, sequenceSpeechArray, leadOut);
@ -758,7 +758,7 @@ int32 FN_play_sequence(int32 *params) {
rv = PlaySmacker(filename, NULL, leadOut);
// unpause sound fx again, in case we're staying in same location
g_sound->UnpauseFx();
g_sound->unpauseFx();
// close the lead-out music resource

View File

@ -787,12 +787,12 @@ public:
_objectLabelsSwitch->setValue(pointerTextSelected != 0);
_subtitlesSwitch->setValue(subtitles != 0);
_reverseStereoSwitch->setValue(stereoReversed != 0);
_musicSwitch->setValue(g_sound->IsMusicMute() == 0);
_speechSwitch->setValue(g_sound->IsSpeechMute() == 0);
_fxSwitch->setValue(g_sound->IsFxMute() == 0);
_musicSlider->setValue(g_sound->GetMusicVolume());
_speechSlider->setValue(g_sound->GetSpeechVolume());
_fxSlider->setValue(g_sound->GetFxVolume());
_musicSwitch->setValue(g_sound->isMusicMute() == 0);
_speechSwitch->setValue(g_sound->isSpeechMute() == 0);
_fxSwitch->setValue(g_sound->isFxMute() == 0);
_musicSlider->setValue(g_sound->getMusicVolume());
_speechSlider->setValue(g_sound->getSpeechVolume());
_fxSlider->setValue(g_sound->getFxVolume());
_gfxSlider->setValue(GetRenderType());
_gfxPreview->setState(GetRenderType());
}
@ -851,13 +851,13 @@ public:
if (widget == _reverseStereoSwitch) {
if (result != stereoReversed)
g_sound->ReverseStereo();
g_sound->reverseStereo();
stereoReversed = result;
} else if (widget == _musicSwitch) {
g_sound->MuteMusic(result);
g_sound->muteMusic(result);
} else if (widget == _musicSlider) {
g_sound->SetMusicVolume(result);
g_sound->MuteMusic(result == 0);
g_sound->setMusicVolume(result);
g_sound->muteMusic(result == 0);
_musicSwitch->setValue(result != 0);
} else if (widget == _speechSlider) {
_speechSwitch->setValue(result != 0);
@ -868,12 +868,12 @@ public:
UpdateGraphicsLevel(result);
} else if (widget == _okButton) {
// Apply the changes
g_sound->MuteMusic(_musicSwitch->getValue() == 0);
g_sound->MuteSpeech(_speechSwitch->getValue() == 0);
g_sound->MuteFx(_fxSwitch->getValue() == 0);
g_sound->SetMusicVolume(_musicSlider->getValue());
g_sound->SetSpeechVolume(_speechSlider->getValue());
g_sound->SetFxVolume(_fxSlider->getValue());
g_sound->muteMusic(_musicSwitch->getValue() == 0);
g_sound->muteSpeech(_speechSwitch->getValue() == 0);
g_sound->muteFx(_fxSwitch->getValue() == 0);
g_sound->setMusicVolume(_musicSlider->getValue());
g_sound->setSpeechVolume(_speechSlider->getValue());
g_sound->setFxVolume(_fxSlider->getValue());
UpdateGraphicsLevel(_gfxSlider->getValue());
@ -1467,12 +1467,12 @@ int32 ReadOptionSettings(void) {
delete fp;
delete mgr;
g_sound->SetMusicVolume(buff[0]);
g_sound->SetSpeechVolume(buff[1]);
g_sound->SetFxVolume(buff[2]);
g_sound->MuteMusic(buff[3]);
g_sound->MuteSpeech(buff[4]);
g_sound->MuteFx(buff[5]);
g_sound->setMusicVolume(buff[0]);
g_sound->setSpeechVolume(buff[1]);
g_sound->setFxVolume(buff[2]);
g_sound->muteMusic(buff[3]);
g_sound->muteSpeech(buff[4]);
g_sound->muteFx(buff[5]);
UpdateGraphicsLevel(buff[6]);
@ -1481,7 +1481,7 @@ int32 ReadOptionSettings(void) {
pointerTextSelected = buff[8];
if (buff[9] != stereoReversed)
g_sound->ReverseStereo();
g_sound->reverseStereo();
stereoReversed = buff[9];
return 0;
@ -1495,12 +1495,12 @@ int32 WriteOptionSettings(void) {
sprintf(filename, "%s-settings.dat", g_sword2->_game_name);
buff[0] = g_sound->GetMusicVolume();
buff[1] = g_sound->GetSpeechVolume();
buff[2] = g_sound->GetFxVolume();
buff[3] = g_sound->IsMusicMute();
buff[4] = g_sound->IsSpeechMute();
buff[5] = g_sound->IsFxMute();
buff[0] = g_sound->getMusicVolume();
buff[1] = g_sound->getSpeechVolume();
buff[2] = g_sound->getFxVolume();
buff[3] = g_sound->isMusicMute();
buff[4] = g_sound->isSpeechMute();
buff[5] = g_sound->isFxMute();
buff[6] = GetRenderType();
buff[7] = subtitles;
buff[8] = pointerTextSelected;

File diff suppressed because it is too large Load Diff

View File

@ -64,79 +64,79 @@ public:
};
class Sword2Sound {
public:
Sword2Sound(SoundMixer *mixer);
~Sword2Sound();
void FxServer(int16 *data, uint len);
int32 PlaySpeech(uint8 *data, uint8 vol, int8 pan);
int32 PlayCompSpeech(const char *filename, uint32 speechid, uint8 vol, int8 pan);
uint32 PreFetchCompSpeech(const char *filename, uint32 speechid, uint16 **buf);
int32 AmISpeaking();
int32 StopSpeechSword2(void);
int32 GetSpeechStatus(void);
int32 PauseSpeech(void);
int32 UnpauseSpeech(void);
int32 OpenFx(int32 id, uint8 *data);
int32 PlayFx(int32 id, uint8 *data, uint8 vol, int8 pan, uint8 type);
int32 CloseFx(int32 id);
int32 ClearAllFx(void);
int32 PauseFx(void);
int32 PauseFxForSequence(void);
int32 UnpauseFx(void);
int32 PauseMusic(void);
int32 UnpauseMusic(void);
int32 StreamCompMusic(const char *filename, uint32 musicId, bool looping);
void saveMusicState();
void restoreMusicState();
void playLeadOut(uint8 *leadOut);
int32 MusicTimeRemaining();
int32 ReverseStereo(void);
uint8 GetFxVolume(void);
uint8 GetSpeechVolume(void);
uint8 GetMusicVolume(void);
uint8 IsMusicMute(void);
uint8 IsFxMute(void);
uint8 IsSpeechMute(void);
void StopMusic(void);
void SetFxVolume(uint8 vol);
void SetSpeechVolume(uint8 vol);
void SetMusicVolume(uint8 vol);
void MuteMusic(uint8 mute);
void MuteFx(uint8 mute);
void MuteSpeech(uint8 mute);
int32 IsFxOpen(int32 id);
int32 SetFxVolumePan(int32 id, uint8 vol, int8 pan);
int32 SetFxIdVolume(int32 id, uint8 vol);
void UpdateCompSampleStreaming(int16 *data, uint len);
SoundMixer *_mixer;
private:
int32 StreamCompMusicFromLock(const char *filename, uint32 musicId, bool looping);
int32 GetFxIndex(int32 id);
int32 DipMusic();
private:
SoundMixer *_mixer;
OSystem::MutexRef _mutex;
RateConverter *_converter;
OSystem::MutexRef _mutex;
RateConverter *_converter;
FxHandle fx[MAXFX];
MusicHandle music[MAXMUS + 1];
FxHandle _fx[MAXFX];
MusicHandle _music[MAXMUS + 1];
// We used to have two music volumes - one for each channel -
// but they were always set to the same value.
// We used to have two music volumes - one for each channel -
// but they were always set to the same value.
uint8 musicVol;
uint8 _musicVol;
uint8 soundOn;
uint8 speechStatus;
uint8 fxPaused;
uint8 speechPaused;
uint8 speechVol;
uint8 fxVol;
uint8 speechMuted;
uint8 fxMuted;
uint8 _soundOn;
uint8 _speechStatus;
uint8 _fxPaused;
uint8 _speechPaused;
uint8 _speechVol;
uint8 _fxVol;
uint8 _speechMuted;
uint8 _fxMuted;
PlayingSoundHandle soundHandleSpeech;
uint8 musicMuted;
PlayingSoundHandle _soundHandleSpeech;
uint8 _musicMuted;
int32 getFxIndex(int32 id);
int32 dipMusic();
void updateCompSampleStreaming(int16 *data, uint len);
public:
Sword2Sound(SoundMixer *mixer);
~Sword2Sound();
void fxServer(int16 *data, uint len);
int32 playCompSpeech(const char *filename, uint32 speechid, uint8 vol, int8 pan);
uint32 preFetchCompSpeech(const char *filename, uint32 speechid, uint16 **buf);
int32 amISpeaking();
int32 stopSpeech(void);
int32 getSpeechStatus(void);
void pauseSpeech(void);
void unpauseSpeech(void);
int32 openFx(int32 id, uint8 *data);
int32 playFx(int32 id, uint8 *data, uint8 vol, int8 pan, uint8 type);
int32 closeFx(int32 id);
void clearAllFx(void);
void pauseFx(void);
void pauseFxForSequence(void);
void unpauseFx(void);
void pauseMusic(void);
void unpauseMusic(void);
int32 streamCompMusic(const char *filename, uint32 musicId, bool looping);
void saveMusicState();
void restoreMusicState();
void playLeadOut(uint8 *leadOut);
int32 musicTimeRemaining();
void reverseStereo(void);
uint8 getFxVolume(void);
uint8 getSpeechVolume(void);
uint8 getMusicVolume(void);
uint8 isMusicMute(void);
uint8 isFxMute(void);
uint8 isSpeechMute(void);
void stopMusic(void);
void setFxVolume(uint8 vol);
void setSpeechVolume(uint8 vol);
void setMusicVolume(uint8 vol);
void muteMusic(uint8 mute);
void muteFx(uint8 mute);
void muteSpeech(uint8 mute);
int32 isFxOpen(int32 id);
int32 setFxIdVolumePan(int32 id, uint8 vol, int8 pan);
int32 setFxIdVolume(int32 id, uint8 vol);
};
#endif

View File

@ -398,9 +398,9 @@ int32 FN_play_credits(int32 *params) {
g_sound->saveMusicState();
g_sound->MuteFx(1);
g_sound->MuteSpeech(1);
g_sound->StopMusic();
g_sound->muteFx(1);
g_sound->muteSpeech(1);
g_sound->stopMusic();
memcpy(oldPal, palCopy, 1024);
memset(tmpPal, 0, 1024);
@ -421,13 +421,13 @@ int32 FN_play_credits(int32 *params) {
pars[1] = FX_SPOT;
FN_play_music(pars);
music_length = 1000 * g_sound->MusicTimeRemaining();
music_length = 1000 * g_sound->musicTimeRemaining();
debug(0, "Credits music length: ~%d ms", music_length);
CloseMenuImmediately();
while (g_sound->MusicTimeRemaining()) {
while (g_sound->musicTimeRemaining()) {
EraseBackBuffer();
SetNeedRedraw();
@ -454,8 +454,8 @@ int32 FN_play_credits(int32 *params) {
Build_display();
WaitForFade();
g_sound->MuteFx(0);
g_sound->MuteSpeech(0);
g_sound->muteFx(0);
g_sound->muteSpeech(0);
}
// FIXME: This probably isn't the correct way of shutting down ScummVM

View File

@ -171,7 +171,6 @@ void System_menu(void) {
_mouseEvent *me;
int j, hit;
uint8 *icon;
uint32 rv; // for drivers return value
int32 pars[2];
uint32 icon_list[5] = {
OPTIONS_ICON,
@ -215,9 +214,7 @@ void System_menu(void) {
}
}
rv = g_sound->PauseFx();
if (rv != RD_OK)
debug(5, "ERROR: PauseFx() returned %.8x in SystemMenu()", rv);
g_sound->pauseFx();
// NB. Need to keep a safe copy of
// 'looping_music_id' for savegame & for
@ -282,7 +279,6 @@ void System_menu(void) {
if (this_screen.new_palette != 99) {
// '0' means put back game screen
// palette; see Build_display.cpp
// (James17jun97)
SetFullPalette(0);
@ -293,9 +289,7 @@ void System_menu(void) {
} else
this_screen.new_palette = 1;
rv = g_sound->UnpauseFx();
if (rv != RD_OK)
debug(5, "ERROR: UnpauseFx() returned %.8x in SystemMenu()", rv);
g_sound->unpauseFx();
// If there was looping music before coming
// into the control panels then restart it!

View File

@ -91,7 +91,7 @@ void Process_fx_queue(void) {
break;
case FX_SPOT2:
// Once the Fx has finished remove it from the queue.
if (g_sound->IsFxOpen(j + 1))
if (g_sound->isFxOpen(j + 1))
fxq[j].resource = 0;
break;
}
@ -112,7 +112,7 @@ void Trigger_fx(uint8 j) {
data = res_man.open(fxq[j].resource);
data += sizeof(_standardHeader);
// wav data gets copied to sound memory
rv = g_sound->PlayFx(id, data, fxq[j].volume, fxq[j].pan, RDSE_FXSPOT);
rv = g_sound->playFx(id, data, fxq[j].volume, fxq[j].pan, RDSE_FXSPOT);
// release the sample
res_man.close(fxq[j].resource);
} else {
@ -122,15 +122,15 @@ void Trigger_fx(uint8 j) {
if (fxq[j].type == FX_RANDOM) {
// Not looped
rv = g_sound->PlayFx(id, NULL, fxq[j].volume, fxq[j].pan, RDSE_FXSPOT);
rv = g_sound->playFx(id, NULL, fxq[j].volume, fxq[j].pan, RDSE_FXSPOT);
} else {
// Looped
rv = g_sound->PlayFx(id, NULL, fxq[j].volume, fxq[j].pan, RDSE_FXLOOP);
rv = g_sound->playFx(id, NULL, fxq[j].volume, fxq[j].pan, RDSE_FXLOOP);
}
}
if (rv)
debug(5, "SFX ERROR: PlayFx() returned %.8x", rv);
debug(5, "SFX ERROR: playFx() returned %.8x", rv);
}
// called from script only
@ -231,10 +231,10 @@ int32 FN_play_fx(int32 *params) {
data += sizeof(_standardHeader);
// copy it to sound memory, using position in queue as 'id'
rv = g_sound->OpenFx(id, data);
rv = g_sound->openFx(id, data);
if (rv)
debug(5, "SFX ERROR: OpenFx() returned %.8x", rv);
debug(5, "SFX ERROR: openFx() returned %.8x", rv);
// release the sample
res_man.close(fxq[j].resource);
@ -269,9 +269,9 @@ int32 FN_set_fx_vol_and_pan(int32 *params) {
debug(5, "FN_set_fx_vol_and_pan(%d, %d, %d)", params[0], params[1], params[2]);
// SetFxVolumePan(int32 id, uint8 vol, uint8 pan);
// setFxIdVolumePan(int32 id, uint8 vol, uint8 pan);
// driver fx_id is 1 + <pos in queue>
g_sound->SetFxVolumePan(1 + params[0], params[1], params[2]);
g_sound->setFxIdVolumePan(1 + params[0], params[1], params[2]);
return IR_CONT;
}
@ -283,7 +283,7 @@ int32 FN_set_fx_vol(int32 *params) {
// 1 new volume (0..16)
// SetFxIdVolume(int32 id, uint8 vol);
g_sound->SetFxIdVolume(1 + params[0], params[1]);
g_sound->setFxIdVolume(1 + params[0], params[1]);
return IR_CONT;
}
@ -304,10 +304,10 @@ int32 FN_stop_fx(int32 *params) {
id = (uint32) j + 1; // because 0 is not a valid id
// stop fx & remove sample from sound memory
rv = g_sound->CloseFx(id);
rv = g_sound->closeFx(id);
if (rv)
debug(5, "SFX ERROR: CloseFx() returned %.8x", rv);
debug(5, "SFX ERROR: closeFx() returned %.8x", rv);
}
// remove from queue
@ -330,34 +330,12 @@ int32 FN_stop_all_fx(int32 *params) {
void Clear_fx_queue(void) {
// stop all fx & remove the samples from sound memory
g_sound->ClearAllFx();
g_sound->clearAllFx();
// clean out the queue
Init_fx_queue();
}
// ===========================================================================
// int32 StreamMusic(uint8 *filename, int32 loopFlag)
//
// Streams music from the file defined by filename. The loopFlag should
// be set to RDSE_FXLOOP if the music is to loop back to the start.
// Otherwise, it should be RDSE_FXSPOT.
// The return value must be checked for any problems.
//
// ---------------------------------------------------------------------------
//
// int32 PauseMusic(void)
//
// Stops the music dead in it's tracks.
//
// ---------------------------------------------------------------------------
//
// int32 UnpauseMusic(void)
//
// Re-starts the music from where it was stopped.
//
// ===========================================================================
int32 FN_prepare_music(int32 *params) {
return IR_CONT;
}
@ -406,10 +384,10 @@ int32 FN_play_music(int32 *params) {
strcpy(filename, "music.clu");
}
rv = g_sound->StreamCompMusic(filename, params[0], loopFlag);
rv = g_sound->streamCompMusic(filename, params[0], loopFlag);
if (rv)
debug(5, "ERROR: StreamCompMusic(%s, %d, %d) returned error 0x%.8x", filename, params[0], loopFlag, rv);
debug(5, "ERROR: streamCompMusic(%s, %d, %d) returned error 0x%.8x", filename, params[0], loopFlag, rv);
return IR_CONT;
}
@ -418,13 +396,13 @@ int32 FN_stop_music(int32 *params) { // called from script only
// params: none
looping_music_id = 0; // clear the 'looping' flag
g_sound->StopMusic();
g_sound->stopMusic();
return IR_CONT;
}
void Kill_music(void) { // James22aug97
looping_music_id = 0; // clear the 'looping' flag
g_sound->StopMusic();
g_sound->stopMusic();
}
int32 FN_check_music_playing(int32 *params) {
@ -434,39 +412,19 @@ int32 FN_check_music_playing(int32 *params) {
// or 0 if no music playing
// in seconds, rounded up to the nearest second
RESULT = g_sound->MusicTimeRemaining();
RESULT = g_sound->musicTimeRemaining();
return IR_CONT;
}
void PauseAllSound(void) {
uint32 rv;
rv = g_sound->PauseMusic();
if (rv != RD_OK)
debug(5, "ERROR: PauseMusic() returned %.8x in PauseAllSound()", rv);
rv = g_sound->PauseSpeech();
if (rv != RD_OK)
debug(5, "ERROR: PauseSpeech() returned %.8x in PauseAllSound()", rv);
rv = g_sound->PauseFx();
if (rv != RD_OK)
debug(5, "ERROR: PauseFx() returned %.8x in PauseAllSound()", rv);
g_sound->pauseMusic();
g_sound->pauseSpeech();
g_sound->pauseFx();
}
void UnpauseAllSound(void) {
uint32 rv;
rv = g_sound->UnpauseMusic();
if (rv != RD_OK)
debug(5, "ERROR: UnpauseMusic() returned %.8x in UnpauseAllSound()", rv);
rv = g_sound->UnpauseSpeech();
if (rv != RD_OK)
debug(5, "ERROR: UnpauseSpeech() returned %.8x in UnpauseAllSound()", rv);
rv = g_sound->UnpauseFx();
if (rv != RD_OK)
debug(5, "ERROR: UnpauseFx() returned %.8x in UnpauseAllSound()", rv);
g_sound->unpauseMusic();
g_sound->unpauseSpeech();
g_sound->unpauseFx();
}

View File

@ -968,7 +968,7 @@ int32 FN_i_speak(int32 *params) {
// New fudge to wait for smacker samples to finish
// since they can over-run into the game
if (g_sound->GetSpeechStatus() != RDSE_SAMPLEFINISHED)
if (g_sound->getSpeechStatus() != RDSE_SAMPLEFINISHED)
return IR_REPEAT;
// New fudge for 'fx' subtitles
@ -1199,7 +1199,7 @@ int32 FN_i_speak(int32 *params) {
strcpy(speechFile, "speech.clu");
// Load speech but don't start playing yet
rv = g_sound->PlayCompSpeech(speechFile, params[S_WAV], SPEECH_VOLUME, speech_pan);
rv = g_sound->playCompSpeech(speechFile, params[S_WAV], SPEECH_VOLUME, speech_pan);
if (rv == RD_OK) {
// ok, we've got something to play
// (2 means not playing yet - see below)
@ -1207,7 +1207,7 @@ int32 FN_i_speak(int32 *params) {
// set it playing now (we might want to do
// this next cycle, don't know yet)
g_sound->UnpauseSpeech();
g_sound->unpauseSpeech();
} else {
debug(5, "ERROR: PlayCompSpeech(speechFile=\"%s\", wav=%d (res=%d pos=%d)) returned %.8x", speechFile, params[S_WAV], text_res, local_text, rv);
}
@ -1247,7 +1247,7 @@ int32 FN_i_speak(int32 *params) {
// if playing a sample
if (!unpause_zone) {
// if we're at a quiet bit
if (g_sound->AmISpeaking() == RDSE_QUIET) {
if (g_sound->amISpeaking() == RDSE_QUIET) {
// restart from frame 0
// ('closed mouth' frame)
ob_graphic->anim_pc = 0;
@ -1277,11 +1277,11 @@ int32 FN_i_speak(int32 *params) {
// if playing a sample (note that value of '2' means about to play!)
if (speechRunning==1) {
if (speechRunning == 1) {
if (!unpause_zone) {
// has it finished? James25feb97
if (g_sound->GetSpeechStatus() == RDSE_SAMPLEFINISHED)
speechFinished=1;
// has it finished?
if (g_sound->getSpeechStatus() == RDSE_SAMPLEFINISHED)
speechFinished = 1;
} else
unpause_zone--;
} else if (speechRunning == 0 && speech_time) {
@ -1289,7 +1289,7 @@ int32 FN_i_speak(int32 *params) {
// ends the speech
// if no sample then we're using speech_time to end speech
// naturally James25feb97
// naturally
speech_time--;
if (!speech_time)
@ -1315,7 +1315,7 @@ int32 FN_i_speak(int32 *params) {
// mouse click, after click_delay has expired -> end the speech
// we ignore mouse releases
#ifdef _SWORD2_DEBUG // (James26jun97)
#ifdef _SWORD2_DEBUG
// if testing text & speech
if (SYSTEM_TESTING_TEXT) {
// and RB used to click past text
@ -1334,12 +1334,12 @@ int32 FN_i_speak(int32 *params) {
me = MouseEvent();
} while (me);
speechFinished = 1; // James25feb97
speechFinished = 1;
// if speech sample playing
if (speechRunning) {
// halt the sample prematurely
g_sound->StopSpeechSword2();
g_sound->stopSpeech();
}
}

View File

@ -255,8 +255,8 @@ uint32 Con_start(uint8 *input) {
FN_stop_music(NULL);
// halt the sample prematurely
g_sound->UnpauseSpeech();
g_sound->StopSpeechSword2();
g_sound->unpauseSpeech();
g_sound->stopSpeech();
// clean out all resources & flags, ready for a total
// restart (James24mar97)