#ifndef VOXWARE
#define VOXWARE
#endif
+
+#if 0
/* where is the right declaration for 'ioctl'? */
extern void ioctl(long, long, void *);
+#else
+#include <sys/ioctl.h>
+#endif
+
#endif
#ifdef __FreeBSD__
#define HPUX_AUDIO
#endif /* _HPUX_SOURCE */
-#ifndef MSDOS
+#if !defined(PLATFORM_MSDOS)
#define MAX_SOUNDS_PLAYING 16
#else
#define MAX_SOUNDS_PLAYING 8
#endif
/* some values for PlaySound(), StopSound() and friends */
-#ifndef MSDOS
+#if !defined(PLATFORM_MSDOS)
#define PSND_SILENCE 0
#define PSND_MAX_VOLUME_BITS 7
#define PSND_MIN_VOLUME 0
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
+struct SampleInfo
{
- unsigned char *name;
- unsigned char *file_ptr;
- char *data_ptr;
- long file_len, data_len;
-#ifdef MSDOS
+ char *name;
+ byte *data_ptr;
+ long data_len;
+
+#if defined(PLATFORM_MSDOS)
SAMPLE *sample_ptr;
#endif
+
+#if defined(TARGET_SDL)
+ Mix_Chunk *mix_chunk;
+#endif
};
struct SoundControl
int playingtime;
long playingpos;
long data_len;
- char *data_ptr;
-#ifdef MSDOS
+ byte *data_ptr;
+
+#if defined(PLATFORM_MSDOS)
int voice;
#endif
};
-/* sound server functions */
+/* general sound functions */
+int OpenAudio(char *);
+int CheckAudio(char *);
+boolean UnixInitAudio(void);
+
+/* sound server functions */
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 */
-boolean LoadSound(struct SoundInfo *);
+
+/* sound client functions */
+boolean LoadSound(struct SampleInfo *);
void PlaySound(int);
void PlaySoundStereo(int, int);
void PlaySoundLoop(int);