--- np2/generic/cmjasts.c 2003/12/26 23:30:26 1.2 +++ np2/generic/cmjasts.c 2005/02/07 14:46:10 1.4 @@ -22,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; @@ -55,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); @@ -111,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; + } } }