|
|
| version 1.1, 2003/11/16 16:43:45 | version 1.8, 2011/12/24 17:50:44 |
|---|---|
| Line 1 | Line 1 |
| #ifndef NP2_X11_SOUNGMNG_H__ | #ifndef NP2_X11_SOUNGMNG_H__ |
| #define NP2_X11_SOUNGMNG_H__ | #define NP2_X11_SOUNGMNG_H__ |
| #ifdef __cplusplus | G_BEGIN_DECLS |
| extern "C" { | |
| #endif | |
| enum { | enum { |
| SOUND_PCMSEEK, | SOUND_PCMSEEK, |
| Line 13 enum { | Line 11 enum { |
| enum { | enum { |
| SNDDRV_NODRV, | SNDDRV_NODRV, |
| SNDDRV_NETBSD, | |
| SNDDRV_OSS, | |
| SNDDRV_ESD, | |
| SNDDRV_SDL, | SNDDRV_SDL, |
| SNDDRV_DRVMAX | SNDDRV_DRVMAX |
| }; | }; |
| Line 24 BYTE snddrv_drv2num(const char *); | Line 19 BYTE snddrv_drv2num(const char *); |
| const char *snddrv_num2drv(BYTE); | const char *snddrv_num2drv(BYTE); |
| #if !defined(NOSOUND) | #if !defined(NOSOUND) |
| #ifndef NSOUNDBUFFER | |
| #define NSOUNDBUFFER 2 | |
| #endif | |
| typedef struct { | |
| BOOL (*drvinit)(UINT rate, UINT samples); | |
| BOOL (*drvterm)(void); | |
| void (*sndplay)(void); | |
| void (*sndstop)(void); | |
| void *(*pcmload)(UINT num, const char *path); | |
| void (*pcmdestroy)(void *chanp, UINT num); | |
| void (*pcmplay)(void *chanp, UINT num, BOOL loop); | |
| void (*pcmstop)(void *chanp, UINT num); | |
| void (*pcmvolume)(void *chanp, UINT num, int volume); | |
| } snddrv_t; | |
| extern int audio_fd; | |
| extern snddrv_t snddrv; | |
| extern int sound_nextbuf; | |
| extern char *sound_event; | |
| extern char *sound_buffer[NSOUNDBUFFER]; | |
| UINT calc_blocksize(UINT size); | |
| UINT calc_fragment(UINT size); | |
| BOOL netbsdaudio_setup(void); | |
| BOOL ossaudio_setup(void); | |
| BOOL esdaudio_setup(void); | |
| BOOL sdlaudio_setup(void); | |
| BOOL sdlmixer_setup(void); | |
| void snddrv_play(void); | |
| void snddrv_stop(void); | |
| UINT soundmng_create(UINT rate, UINT ms); | UINT soundmng_create(UINT rate, UINT ms); |
| void soundmng_destroy(void); | void soundmng_destroy(void); |
| void soundmng_reset(void); | void soundmng_reset(void); |
| Line 80 void soundmng_deinitialize(void); | Line 37 void soundmng_deinitialize(void); |
| BOOL soundmng_pcmload(UINT num, const char *filename); | BOOL soundmng_pcmload(UINT num, const char *filename); |
| void soundmng_pcmvolume(UINT num, int volume); | void soundmng_pcmvolume(UINT num, int volume); |
| void *nosound_pcmload(UINT num, const char *); | |
| void nosound_pcmdestroy(void *chanp, UINT num); | extern int pcm_volume_default; |
| void nosound_pcmplay(void *chanp, UINT num, BOOL loop); | |
| void nosound_pcmstop(void *chanp, UINT num); | |
| void nosound_pcmvolume(void *chanp, UINT num, int volume); | |
| #else /* NOSOUND */ | #else /* NOSOUND */ |
| #define soundmng_create(rate, ms) 0, (void)rate, (void)ms | #define soundmng_create(rate, ms) 0 |
| #define soundmng_destroy() | #define soundmng_destroy() |
| #define soundmng_reset() | #define soundmng_reset() |
| #define soundmng_play() | #define soundmng_play() |
| Line 104 void nosound_pcmvolume(void *chanp, UINT | Line 58 void nosound_pcmvolume(void *chanp, UINT |
| #define soundmng_initialize() np2cfg.SOUND_SW = 0, FAILURE | #define soundmng_initialize() np2cfg.SOUND_SW = 0, FAILURE |
| #define soundmng_deinitialize() | #define soundmng_deinitialize() |
| #define soundmng_pcmload(num, filename) | #define soundmng_pcmload(num, filename) FAILURE |
| #define soundmng_pcmvolume(num, volume) | #define soundmng_pcmvolume(num, volume) |
| #endif /* !NOSOUND */ | #endif /* !NOSOUND */ |
| #ifdef __cplusplus | G_END_DECLS |
| } | |
| #endif | |
| #endif /* NP2_X11_SOUNGMNG_H__ */ | #endif /* NP2_X11_SOUNGMNG_H__ */ |