projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rnd-20020510-8-src
[rocksndiamonds.git]
/
src
/
libgame
/
sound.h
diff --git
a/src/libgame/sound.h
b/src/libgame/sound.h
index 945b88f813ec0b88bc48d6f7b732a08af6a353a9..f1cd4aeb80eafa004851d66aa875f0bfb739d1f2 100644
(file)
--- a/
src/libgame/sound.h
+++ b/
src/libgame/sound.h
@@
-36,6
+36,10
@@
#include "system.h"
#include "system.h"
+#if defined(PLATFORM_UNIX) && !defined(TARGET_SDL)
+#define AUDIO_UNIX_NATIVE
+#endif
+
#if defined(PLATFORM_LINUX) || defined(PLATFORM_FREEBSD) || defined(VOXWARE)
#define AUDIO_LINUX_IOCTL
#endif
#if defined(PLATFORM_LINUX) || defined(PLATFORM_FREEBSD) || defined(VOXWARE)
#define AUDIO_LINUX_IOCTL
#endif
@@
-55,6
+59,7
@@
#define AUDIO_NUM_CHANNELS_MONO 1
#define AUDIO_NUM_CHANNELS_STEREO 2
#define AUDIO_NUM_CHANNELS_MONO 1
#define AUDIO_NUM_CHANNELS_STEREO 2
+#define AUDIO_FORMAT_UNKNOWN (0)
#define AUDIO_FORMAT_U8 (1 << 0)
#define AUDIO_FORMAT_S16 (1 << 1)
#define AUDIO_FORMAT_LE (1 << 2)
#define AUDIO_FORMAT_U8 (1 << 0)
#define AUDIO_FORMAT_S16 (1 << 1)
#define AUDIO_FORMAT_LE (1 << 2)
@@
-254,6
+259,7
@@
typedef struct SampleInfo MusicInfo;
#define IS_STOPPING(x) ((x).state & SND_CTRL_STOP)
#define IS_RELOADING(x) ((x).state & (SND_CTRL_RELOAD_SOUNDS | \
SND_CTRL_RELOAD_MUSIC))
#define IS_STOPPING(x) ((x).state & SND_CTRL_STOP)
#define IS_RELOADING(x) ((x).state & (SND_CTRL_RELOAD_SOUNDS | \
SND_CTRL_RELOAD_MUSIC))
+#define IS_MUSIC_MODULE(x) ((x).format == AUDIO_FORMAT_UNKNOWN)
#define ALL_SOUNDS(x) ((x).state & SND_CTRL_ALL_SOUNDS)
struct SoundControl
#define ALL_SOUNDS(x) ((x).state & SND_CTRL_ALL_SOUNDS)
struct SoundControl
@@
-264,17
+270,7
@@
struct SoundControl
int volume;
int stereo;
int volume;
int stereo;
-#if 1
int state;
int state;
-#else
- boolean loop;
- boolean music;
- boolean fade_sound;
- boolean stop_sound;
- boolean stop_all_sounds;
- boolean reload_sounds;
- boolean reload_music;
-#endif
int playingtime;
long playingpos;
int playingtime;
long playingpos;
@@
-288,14
+284,15
@@
struct SoundControl
#endif
};
#endif
};
+typedef struct SoundControl SoundControl;
+
/* general sound functions */
void UnixOpenAudio(void);
void UnixCloseAudio(void);
/* general sound functions */
void UnixOpenAudio(void);
void UnixCloseAudio(void);
-/* sound server functions */
-void InitPlaylist(void);
-void StartSoundserver(void);
-void SoundServer(void);
+/* mixer functions */
+void Mixer_InitChannels(void);
+void StartMixer(void);
/* sound client functions */
void PlayMusic(int);
/* sound client functions */
void PlayMusic(int);