X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=blobdiff_plain;f=src%2Fsound.h;h=0811e5a21bb2c00f50f9149bea01400f1897be5c;hp=4b17f3acd8b5c9bc3ebd73a07a152b3bad10c758;hb=3ae3dff29ac1a6022b1e5af414ba2c99391148c8;hpb=e5c5bf5c4a76a04f9bf64e92227bf2ef969fd25c diff --git a/src/sound.h b/src/sound.h index 4b17f3ac..0811e5a2 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__ @@ -79,9 +85,6 @@ extern void ioctl(long, long, void *); #define SSND_STOPPING(x) (x & (SSND_STOP_SOUND | SSND_STOP_ALL_SOUNDS)) #define SSND_ALL(x) (x&(SSND_FADE_ALL_SOUNDS|SSND_STOP_ALL_SOUNDS)) -#define TRUE 1 -#define FALSE 0 - /* settings for sound path, sound device, etc. */ #ifndef SND_PATH #define SND_PATH "./sounds" @@ -122,11 +125,21 @@ 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 { - unsigned char *name; - unsigned char *file_ptr; - char *data_ptr; + char *name; + byte *file_ptr; + byte *data_ptr; long file_len, data_len; #ifdef MSDOS SAMPLE *sample_ptr; @@ -146,22 +159,16 @@ struct SoundControl int playingtime; long playingpos; long data_len; - char *data_ptr; + byte *data_ptr; #ifdef MSDOS int voice; #endif }; -/* sound server functions */ +/* start sound server */ void SoundServer(void); -void SoundServer_InsertNewSound(struct SoundControl); -void SoundServer_StopSound(int); -void SoundServer_StopAllSounds(void); -void HPUX_Audio_Control(void); -unsigned char linear_to_ulaw(int); -int ulaw_to_linear(unsigned char); - -/* application functions */ + +/* client functions */ boolean LoadSound(struct SoundInfo *); void PlaySound(int); void PlaySoundStereo(int, int);