--- np2/sound/sound.c 2003/10/25 19:10:37 1.7 +++ np2/sound/sound.c 2003/11/28 08:01:33 1.9 @@ -37,7 +37,7 @@ static void streamreset(void) { sndstream.ptr = sndstream.buffer; sndstream.remain = sndstream.samples + sndstream.reserve; sndstream.cbreg = sndstream.cb; - SNDCSEC_TERM; + SNDCSEC_LEAVE; } static void streamprepare(UINT samples) { @@ -208,6 +208,7 @@ const SINT32 *sound_pcmlock(void) { const SINT32 *ret; if (locks) { + TRACEOUT(("sound pcm lock: already locked")); return(NULL); } locks++; @@ -220,6 +221,9 @@ const SINT32 *ret; beep_eventreset(); } } + else { + locks--; + } return(ret); }