|
|
| version 1.17, 2004/07/03 17:25:39 | version 1.21, 2005/04/05 20:37:07 |
|---|---|
| Line 68 static void streamprepare(UINT samples) | Line 68 static void streamprepare(UINT samples) |
| #if defined(SUPPORT_WAVEREC) | #if defined(SUPPORT_WAVEREC) |
| // ---- wave rec | // ---- wave rec |
| BOOL sound_recstart(const char *filename) { | BOOL sound_recstart(const OEMCHAR *filename) { |
| WAVEWR rec; | WAVEWR rec; |
| Line 98 static void streamfilewrite(UINT samples | Line 98 static void streamfilewrite(UINT samples |
| CBTBL *cb; | CBTBL *cb; |
| UINT count; | UINT count; |
| SINT32 buf32[2*512]; | SINT32 buf32[2*512]; |
| BYTE buf[2*2*512]; | UINT8 buf[2*2*512]; |
| UINT r; | UINT r; |
| UINT i; | UINT i; |
| SINT32 samp; | SINT32 samp; |
| Line 126 static void streamfilewrite(UINT samples | Line 126 static void streamfilewrite(UINT samples |
| samp = -32768; | samp = -32768; |
| } | } |
| // little endianなので satuation_s16は使えない | // little endianなので satuation_s16は使えない |
| buf[i*2+0] = (BYTE)samp; | buf[i*2+0] = (UINT8)samp; |
| buf[i*2+1] = (BYTE)(samp >> 8); | buf[i*2+1] = (UINT8)(samp >> 8); |
| } | } |
| wavewr_write(sndstream.rec, buf, count * 4); | wavewr_write(sndstream.rec, buf, count * 4); |
| samples -= count; | samples -= count; |
| Line 305 void sound_sync(void) { | Line 305 void sound_sync(void) { |
| } | } |
| else | else |
| #endif | #endif |
| streamprepare(length); | streamprepare(length); |
| soundcfg.lastclock += length * soundcfg.clockbase / soundcfg.hzbase; | soundcfg.lastclock += length * soundcfg.clockbase / soundcfg.hzbase; |
| beep_eventreset(); | beep_eventreset(); |
| SNDCSEC_LEAVE; | SNDCSEC_LEAVE; |
| Line 372 void sound_pcmunlock(const SINT32 *hdl) | Line 372 void sound_pcmunlock(const SINT32 *hdl) |
| // ---- pcmmix | // ---- pcmmix |
| BOOL pcmmix_regist(PMIXDAT *dat, void *datptr, UINT datsize, UINT rate) { | BRESULT pcmmix_regist(PMIXDAT *dat, void *datptr, UINT datsize, UINT rate) { |
| GETSND gs; | GETSND gs; |
| BYTE tmp[256]; | UINT8 tmp[256]; |
| UINT size; | UINT size; |
| UINT r; | UINT r; |
| SINT16 *buf; | SINT16 *buf; |
| Line 421 pmr_err1: | Line 421 pmr_err1: |
| return(FAILURE); | return(FAILURE); |
| } | } |
| BOOL pcmmix_regfile(PMIXDAT *dat, const char *fname, UINT rate) { | BRESULT pcmmix_regfile(PMIXDAT *dat, const OEMCHAR *fname, UINT rate) { |
| FILEH fh; | FILEH fh; |
| UINT size; | UINT size; |
| BYTE *ptr; | UINT8 *ptr; |
| BOOL r; | BRESULT r; |
| r = FAILURE; | r = FAILURE; |
| fh = file_open_rb(fname); | fh = file_open_rb(fname); |
| Line 437 BOOL pcmmix_regfile(PMIXDAT *dat, const | Line 437 BOOL pcmmix_regfile(PMIXDAT *dat, const |
| if (size == 0) { | if (size == 0) { |
| goto pmrf_err2; | goto pmrf_err2; |
| } | } |
| ptr = (BYTE *)_MALLOC(size, fname); | ptr = (UINT8 *)_MALLOC(size, fname); |
| if (ptr == NULL) { | if (ptr == NULL) { |
| goto pmrf_err2; | goto pmrf_err2; |
| } | } |