--- np2/generic/cmjasts.c 2003/12/24 16:11:40 1.1 +++ np2/generic/cmjasts.c 2005/02/07 14:46:10 1.4 @@ -2,6 +2,7 @@ #include "commng.h" #include "cpucore.h" #include "sound.h" +#include "cmjasts.h" #define JSEVENTS 512 @@ -21,14 +22,14 @@ typedef struct { } _CMJAST, *CMJAST; -static UINT jsread(COMMNG self, BYTE *data) { +static UINT jsread(COMMNG self, UINT8 *data) { (void)self; (void)data; return(0); } -static UINT jswrite(COMMNG self, BYTE data) { +static UINT jswrite(COMMNG self, UINT8 data) { CMJAST js; SINT32 pcm; @@ -54,7 +55,7 @@ static UINT jswrite(COMMNG self, BYTE da return(1); } -static BYTE jsgetstat(COMMNG self) { +static UINT8 jsgetstat(COMMNG self) { (void)self; return(0); @@ -110,11 +111,13 @@ static void SOUNDCALL js_getpcm(CMJAST h #else pcmdata = hdl->pcm; #endif - while(count) { - count--; - pcm[0] += pcmdata; - pcm[1] += pcmdata; - pcm += 2; + if (pcmdata) { + while(count) { + count--; + pcm[0] += pcmdata; + pcm[1] += pcmdata; + pcm += 2; + } } }