projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rnd-19981204-1
[rocksndiamonds.git]
/
src
/
sound.h
diff --git
a/src/sound.h
b/src/sound.h
index 02431c4593d136232c0cd93a72ec05d7273f5458..2c747bd859788cd3d16f13ac5d3b759e5a1dc3e8 100644
(file)
--- a/
src/sound.h
+++ b/
src/sound.h
@@
-14,8
+14,8
@@
#ifndef SOUND_H
#define SOUND_H
#ifndef SOUND_H
#define SOUND_H
-#include "main.h"
#include <math.h>
#include <math.h>
+#include "main.h"
#ifdef linux
#include <linux/soundcard.h>
#ifdef linux
#include <linux/soundcard.h>
@@
-79,9
+79,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 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"
/* settings for sound path, sound device, etc. */
#ifndef SND_PATH
#define SND_PATH "./sounds"
@@
-122,11
+119,21
@@
struct SoundHeader_8SVX
char magic_8SVX[4];
};
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 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;
long file_len, data_len;
#ifdef MSDOS
SAMPLE *sample_ptr;
@@
-138,15
+145,15
@@
struct SoundControl
int nr;
int volume;
int stereo;
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;
int playingtime;
long playingpos;
long data_len;
-
char
*data_ptr;
+
byte
*data_ptr;
#ifdef MSDOS
int voice;
#endif
#ifdef MSDOS
int voice;
#endif
@@
-162,11
+169,11
@@
unsigned char linear_to_ulaw(int);
int ulaw_to_linear(unsigned char);
/* application functions */
int ulaw_to_linear(unsigned char);
/* application functions */
-
BOOL
LoadSound(struct SoundInfo *);
+
boolean
LoadSound(struct SoundInfo *);
void PlaySound(int);
void PlaySoundStereo(int, int);
void PlaySoundLoop(int);
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);
void FadeSound(int);
void FadeSounds(void);
void StopSound(int);