diff options
-rw-r--r-- | uisimulator/common/mpegplay.c | 2 | ||||
-rw-r--r-- | uisimulator/common/sound.h (renamed from uisimulator/x11/oss_sound.h) | 16 | ||||
-rw-r--r-- | uisimulator/x11/Makefile | 1 | ||||
-rw-r--r-- | uisimulator/x11/oss_sound.c | 2 |
4 files changed, 18 insertions, 3 deletions
diff --git a/uisimulator/common/mpegplay.c b/uisimulator/common/mpegplay.c index 9af231088e..aaaddfa014 100644 --- a/uisimulator/common/mpegplay.c +++ b/uisimulator/common/mpegplay.c | |||
@@ -34,7 +34,7 @@ | |||
34 | #include <stdio.h> | 34 | #include <stdio.h> |
35 | #include <mad.h> | 35 | #include <mad.h> |
36 | 36 | ||
37 | #include "oss_sound.h" | 37 | #include "sound.h" |
38 | 38 | ||
39 | /* The "dither" code to convert the 24-bit samples produced by libmad was | 39 | /* The "dither" code to convert the 24-bit samples produced by libmad was |
40 | taken from the coolplayer project - coolplayer.sourceforge.net */ | 40 | taken from the coolplayer project - coolplayer.sourceforge.net */ |
diff --git a/uisimulator/x11/oss_sound.h b/uisimulator/common/sound.h index 919ce1aab5..4da5ce9f08 100644 --- a/uisimulator/x11/oss_sound.h +++ b/uisimulator/common/sound.h | |||
@@ -8,7 +8,7 @@ | |||
8 | * | 8 | * |
9 | * Copyright (C) 2002 Dave Chapman | 9 | * Copyright (C) 2002 Dave Chapman |
10 | * | 10 | * |
11 | * oss_sound - a sound driver for Linux (and others?) OSS audio | 11 | * sound.h - common sound driver file. |
12 | * | 12 | * |
13 | * All files in this archive are subject to the GNU General Public License. | 13 | * All files in this archive are subject to the GNU General Public License. |
14 | * See the file COPYING in the source tree root for full license agreement. | 14 | * See the file COPYING in the source tree root for full license agreement. |
@@ -18,11 +18,25 @@ | |||
18 | * | 18 | * |
19 | ****************************************************************************/ | 19 | ****************************************************************************/ |
20 | 20 | ||
21 | #ifndef _SOUND_H | ||
22 | #define _SOUND_H | ||
23 | |||
24 | #ifdef LINUX | ||
21 | 25 | ||
22 | /* The "sound device type" is simply the file descriptor */ | 26 | /* The "sound device type" is simply the file descriptor */ |
23 | #define sound_t int | 27 | #define sound_t int |
24 | 28 | ||
29 | #else | ||
30 | #ifdef WIN32 | ||
31 | #warning "No sound yet in win32" | ||
32 | #else | ||
33 | #warning "No sound in this environment" | ||
34 | #endif | ||
35 | #endif | ||
36 | |||
25 | int init_sound(sound_t* sound); | 37 | int init_sound(sound_t* sound); |
26 | int config_sound(sound_t* sound, int sound_freq, int channels); | 38 | int config_sound(sound_t* sound, int sound_freq, int channels); |
27 | void close_sound(sound_t* sound); | 39 | void close_sound(sound_t* sound); |
28 | int output_sound(sound_t* sound,const void* buf, int count); | 40 | int output_sound(sound_t* sound,const void* buf, int count); |
41 | |||
42 | #endif | ||
diff --git a/uisimulator/x11/Makefile b/uisimulator/x11/Makefile index b73fd08bf3..f00835960c 100644 --- a/uisimulator/x11/Makefile +++ b/uisimulator/x11/Makefile | |||
@@ -45,6 +45,7 @@ UNAME := $(shell uname) | |||
45 | ifeq ($(UNAME),Linux) | 45 | ifeq ($(UNAME),Linux) |
46 | INCLUDES += -I/usr/X11R6/include | 46 | INCLUDES += -I/usr/X11R6/include |
47 | LIBDIRS = -L/usr/X11R6/lib | 47 | LIBDIRS = -L/usr/X11R6/lib |
48 | DEFINES += -DLINUX | ||
48 | else | 49 | else |
49 | LIBDIRS = | 50 | LIBDIRS = |
50 | endif | 51 | endif |
diff --git a/uisimulator/x11/oss_sound.c b/uisimulator/x11/oss_sound.c index 6827842689..853b70d57f 100644 --- a/uisimulator/x11/oss_sound.c +++ b/uisimulator/x11/oss_sound.c | |||
@@ -22,7 +22,7 @@ | |||
22 | #include <fcntl.h> | 22 | #include <fcntl.h> |
23 | 23 | ||
24 | #include <linux/soundcard.h> | 24 | #include <linux/soundcard.h> |
25 | #include "oss_sound.h" | 25 | #include "../common/sound.h" |
26 | 26 | ||
27 | /* We want to use the "real" open in some cases */ | 27 | /* We want to use the "real" open in some cases */ |
28 | #undef open | 28 | #undef open |