X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fsound.h;h=7ebdc65b26b0dd75b3bc2a8bdfea45cb1d0fd6b0;hb=a8b2caa1d373c84c1b3fc2f615370c2a319051ca;hp=ca97ff0a39f735a7cccb6ce700b8ee949cb20f71;hpb=50c422d96b6da2c0412b6bd3763e9d1a029a6014;p=rocksndiamonds.git diff --git a/src/sound.h b/src/sound.h index ca97ff0a..7ebdc65b 100644 --- a/src/sound.h +++ b/src/sound.h @@ -22,8 +22,14 @@ #ifndef VOXWARE #define VOXWARE #endif + +#if 0 /* where is the right declaration for 'ioctl'? */ extern void ioctl(long, long, void *); +#else +#include +#endif + #endif #ifdef __FreeBSD__ @@ -119,25 +125,19 @@ struct SoundHeader_8SVX char magic_8SVX[4]; }; -struct SoundHeader_WAV -{ - char magic_RIFF[4]; - unsigned long header_size; - char magic_WAVE[4]; - char some_stuff[24]; - char magic_DATA[4]; - unsigned long data_size; -}; - struct SoundInfo { char *name; - byte *file_ptr; byte *data_ptr; - long file_len, data_len; + long data_len; + #ifdef MSDOS SAMPLE *sample_ptr; #endif + +#ifdef TARGET_SDL + Mix_Chunk *mix_chunk; +#endif }; struct SoundControl @@ -159,10 +159,15 @@ struct SoundControl #endif }; -/* start sound server */ +/* general sound functions */ +int OpenAudio(char *); +int CheckAudio(char *); +boolean UnixInitAudio(void); + +/* sound server functions */ void SoundServer(void); -/* client functions */ +/* sound client functions */ boolean LoadSound(struct SoundInfo *); void PlaySound(int); void PlaySoundStereo(int, int);