- fixed possible crash when using audio after restarting MacOS

This commit is contained in:
cebix 2000-06-23 14:22:47 +00:00
parent 7cb97f79c1
commit 1790a69a20
4 changed files with 13 additions and 0 deletions

View File

@ -1,4 +1,5 @@
V0.8 (snapshot) -
- audio.cpp: audio_data is cleared on reset [Lauri Pesonen]
- prefs.cpp: empty string prefs items could be written to prefs file
but not read back correctly
- clip_*.cpp: added prefs item "noclipconversion" for turning off

View File

@ -47,6 +47,16 @@ static int open_count = 0; // Open/close nesting count
bool AudioAvailable = false; // Flag: audio output available (from the software point of view)
/*
* Reset audio emulation
*/
void AudioReset(void)
{
audio_data = 0;
}
/*
* Get audio info
*/

View File

@ -84,6 +84,7 @@ void EmulOp(uint16 opcode, M68kRegisters *r)
D(bug("*** RESET ***\n"));
TimerReset();
EtherReset();
AudioReset();
// Create BootGlobs at top of memory
Mac_memset(RAMBaseMac + RAMSize - 4096, 0, 4096);

View File

@ -28,6 +28,7 @@ extern bool AudioAvailable; // Flag: audio output available (from the software
// System specific and internal functions/data
extern void AudioInit(void);
extern void AudioExit(void);
extern void AudioReset(void);
extern void AudioInterrupt(void);