Diff for /np2/sound/getsnd/getsnd.c between versions 1.2 and 1.3

version 1.2, 2004/05/09 15:47:54 version 1.3, 2005/02/07 14:46:13
Line 11  GETSND getsnd_create(void *datptr, UINT  Line 11  GETSND getsnd_create(void *datptr, UINT 
         GETSND          ret;          GETSND          ret;
   
         ZeroMemory(&snd, sizeof(snd));          ZeroMemory(&snd, sizeof(snd));
         r = getwave_open(&snd, (BYTE *)datptr, datsize);          r = getwave_open(&snd, (UINT8 *)datptr, datsize);
 #if defined(SUPPORT_MP3)  #if defined(SUPPORT_MP3)
         if (r == FAILURE) {          if (r == FAILURE) {
                 r = getmp3_open(&snd, (BYTE *)datptr, datsize);                  r = getmp3_open(&snd, (UINT8 *)datptr, datsize);
         }          }
 #endif  #endif
 #if defined(SUPPORT_OGG)  #if defined(SUPPORT_OGG)
         if (r == FAILURE) {          if (r == FAILURE) {
                 r = getogg_open(&snd, (BYTE *)datptr, datsize);                  r = getogg_open(&snd, (UINT8 *)datptr, datsize);
         }          }
 #endif  #endif
         if (r == FAILURE) {          if (r == FAILURE) {
Line 38  GETSND getsnd_create(void *datptr, UINT  Line 38  GETSND getsnd_create(void *datptr, UINT 
         ZeroMemory(ret + 1, size);          ZeroMemory(ret + 1, size);
   
         // ワークとか設定。          // ワークとか設定。
         snd.buffer = (BYTE *)(ret + 1);          snd.buffer = (UINT8 *)(ret + 1);
         snd.work = snd.buffer + blkwork;          snd.work = snd.buffer + blkwork;
         *ret = snd;          *ret = snd;
         if (getsnd_setmixproc(ret, snd.samplingrate, snd.channels) != SUCCESS) {          if (getsnd_setmixproc(ret, snd.samplingrate, snd.channels) != SUCCESS) {
Line 73  gsdes_end: Line 73  gsdes_end:
   
 UINT getsnd_getpcmbyleng(GETSND snd, void *pcm, UINT leng) {  UINT getsnd_getpcmbyleng(GETSND snd, void *pcm, UINT leng) {
   
         BYTE    *pcmp;          UINT8   *pcmp;
         BYTE    *pcmterm;          UINT8   *pcmterm;
   
         if (snd == NULL) {          if (snd == NULL) {
                 goto gsgpl_err;                  goto gsgpl_err;
         }          }
   
         pcmp = (BYTE *)pcm;          pcmp = (UINT8 *)pcm;
         pcmterm = pcmp + leng;          pcmterm = pcmp + leng;
         while(pcmp < pcmterm) {          while(pcmp < pcmterm) {
                 if (snd->remain != 0) {                  if (snd->remain != 0) {
                         pcmp = (BYTE *)(*snd->cnv)(snd, pcmp, pcmterm);                          pcmp = (UINT8 *)(*snd->cnv)(snd, pcmp, pcmterm);
                 }                  }
                 if (snd->remain == 0) {                  if (snd->remain == 0) {
                         snd->buf = snd->buffer;                          snd->buf = snd->buffer;
Line 94  UINT getsnd_getpcmbyleng(GETSND snd, voi Line 94  UINT getsnd_getpcmbyleng(GETSND snd, voi
                         }                          }
                 }                  }
         }          }
         return(UINT)(pcmp - (BYTE *)pcm);          return((UINT)(pcmp - (UINT8 *)pcm));
   
 gsgpl_err:  gsgpl_err:
         return(0);          return(0);

Removed from v.1.2  
changed lines
  Added in v.1.3


RetroPC.NET-CVS <cvs@retropc.net>