--- np2/sound/sound.h 2004/02/18 18:29:29 1.4 +++ np2/sound/sound.h 2005/02/09 20:11:35 1.9 @@ -3,9 +3,7 @@ #define SOUNDCALL #endif -#if defined(SUPPORT_WAVEMIX) -#include "wavemix.h" -#endif +#if !defined(DISABLE_SOUND) typedef void (SOUNDCALL * SOUNDCB)(void *hdl, SINT32 *pcm, UINT count); @@ -37,6 +35,11 @@ void sound_sync(void); const SINT32 *sound_pcmlock(void); void sound_pcmunlock(const SINT32 *hdl); +#if defined(SUPPORT_WAVEREC) +BOOL sound_recstart(const char *filename); +void sound_recstop(void); +#endif + #ifdef __cplusplus } #endif @@ -57,10 +60,14 @@ typedef struct { } PMIXHDR; typedef struct { + SINT16 *sample; + UINT samples; +} PMIXDAT; + +typedef struct { const SINT16 *pcm; UINT remain; - SINT16 *sample; - UINT samples; + PMIXDAT data; UINT flag; SINT32 volume; } PMIXTRK; @@ -75,8 +82,8 @@ typedef struct { extern "C" { #endif -BOOL pcmmix_regist(PMIXTRK *trk, void *datptr, UINT datsize, UINT rate); -BOOL pcmmix_regfile(PMIXTRK *trk, const char *fname, UINT rate); +BRESULT pcmmix_regist(PMIXDAT *dat, void *datptr, UINT datsize, UINT rate); +BRESULT pcmmix_regfile(PMIXDAT *dat, const OEMCHAR *fname, UINT rate); void SOUNDCALL pcmmix_getpcm(PCMMIX hdl, SINT32 *pcm, UINT count); @@ -84,3 +91,13 @@ void SOUNDCALL pcmmix_getpcm(PCMMIX hdl, } #endif +#else + +#define sound_pcmlock() (NULL) +#define sound_pcmunlock(h) +#define sound_reset() +#define sound_changeclock() +#define sound_sync() + +#endif +