X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=blobdiff_plain;f=src%2Fsound.h;h=2e934709e2ee041ebb0be6cc40c9aada059d4b84;hp=213cd746739b02abc5c368a338fac99f1aa5f43d;hb=8d46c5298f0fcce7bdb52f3835b2fbbdc403dfe0;hpb=4b0f1eb4220d2dbe4cffb288f745661b32c96a5b diff --git a/src/sound.h b/src/sound.h index 213cd746..2e934709 100644 --- a/src/sound.h +++ b/src/sound.h @@ -1,13 +1,12 @@ /*********************************************************** * Rocks'n'Diamonds -- McDuffin Strikes Back! * *----------------------------------------------------------* -* ©1995 Artsoft Development * -* Holger Schemel * -* 33659 Bielefeld-Senne * -* Telefon: (0521) 493245 * -* eMail: aeglos@valinor.owl.de * -* aeglos@uni-paderborn.de * -* q99492@pbhrzx.uni-paderborn.de * +* (c) 1995-98 Artsoft Entertainment * +* Holger Schemel * +* Oststrasse 11a * +* 33604 Bielefeld * +* phone: ++49 +521 290471 * +* email: aeglos@valinor.owl.de * *----------------------------------------------------------* * sound.c * ***********************************************************/ @@ -15,16 +14,22 @@ #ifndef SOUND_H #define SOUND_H -#include "main.h" #include +#include "main.h" #ifdef linux #include #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__ @@ -80,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" @@ -125,10 +127,9 @@ struct SoundHeader_8SVX struct SoundInfo { - unsigned char *name; - unsigned char *file_ptr; - char *data_ptr; - long file_len, data_len; + char *name; + byte *data_ptr; + long data_len; #ifdef MSDOS SAMPLE *sample_ptr; #endif @@ -139,35 +140,29 @@ struct SoundControl int nr; int volume; int stereo; - BOOL active; - BOOL loop; - BOOL fade_sound; - BOOL stop_sound; - BOOL stop_all_sounds; + boolean active; + boolean loop; + boolean fade_sound; + boolean stop_sound; + boolean stop_all_sounds; 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 */ -BOOL LoadSound(struct SoundInfo *); + +/* client functions */ +boolean LoadSound(struct SoundInfo *); void PlaySound(int); void PlaySoundStereo(int, int); void PlaySoundLoop(int); -void PlaySoundExt(int, int, int, BOOL); +void PlaySoundExt(int, int, int, boolean); void FadeSound(int); void FadeSounds(void); void StopSound(int);