diff options
Diffstat (limited to 'uisimulator/x11')
-rw-r--r-- | uisimulator/x11/Makefile | 13 | ||||
-rw-r--r-- | uisimulator/x11/oss_sound.c | 4 |
2 files changed, 14 insertions, 3 deletions
diff --git a/uisimulator/x11/Makefile b/uisimulator/x11/Makefile index 8076686f52..36e814e121 100644 --- a/uisimulator/x11/Makefile +++ b/uisimulator/x11/Makefile | |||
@@ -101,6 +101,14 @@ else | |||
101 | endif | 101 | endif |
102 | COMMONSRCS = io.c | 102 | COMMONSRCS = io.c |
103 | 103 | ||
104 | ifeq ($(HAVE_MPEG_PLAY),1) | ||
105 | SOUNDSRC = mpegplay.c oss_sound.c | ||
106 | LDFLAGS += $(SOUND_LDFLAGS) | ||
107 | CFLAGS += $(SOUND_CFLAGS) -DHAVE_MPEG_PLAY | ||
108 | else | ||
109 | SOUNDSRC = | ||
110 | endif | ||
111 | |||
104 | FIRMSRCS = $(LCDSRSC) id3.c debug.c usb.c mpeg.c mp3_playback.c power.c\ | 112 | FIRMSRCS = $(LCDSRSC) id3.c debug.c usb.c mpeg.c mp3_playback.c power.c\ |
105 | powermgmt.c panic.c mp3data.c sprintf.c buffer.c timefuncs.c | 113 | powermgmt.c panic.c mp3data.c sprintf.c buffer.c timefuncs.c |
106 | 114 | ||
@@ -117,7 +125,7 @@ endif | |||
117 | 125 | ||
118 | SRCS = screenhack.c uibasic.c resources.c visual.c lcd-x11.c stubs.c \ | 126 | SRCS = screenhack.c uibasic.c resources.c visual.c lcd-x11.c stubs.c \ |
119 | button-x11.c thread.c sim_icons.c $(APPS) $(MENUS) $(FIRMSRCS) \ | 127 | button-x11.c thread.c sim_icons.c $(APPS) $(MENUS) $(FIRMSRCS) \ |
120 | $(COMMONSRCS) lcd-common.c fmradio.c | 128 | $(COMMONSRCS) $(SOUNDSRC) lcd-common.c fmradio.c |
121 | 129 | ||
122 | ROCKSRC := $(wildcard $(APPDIR)/plugins/*.c) | 130 | ROCKSRC := $(wildcard $(APPDIR)/plugins/*.c) |
123 | ROCKS := $(ROCKSRC:$(APPDIR)/plugins/%.c=$(OBJDIR)/%.rock) | 131 | ROCKS := $(ROCKSRC:$(APPDIR)/plugins/%.c=$(OBJDIR)/%.rock) |
@@ -321,6 +329,9 @@ $(OBJDIR)/lcd-player.o: $(DRIVERS)/lcd-player.c | |||
321 | $(OBJDIR)/radio.o: $(RECDIR)/radio.c | 329 | $(OBJDIR)/radio.o: $(RECDIR)/radio.c |
322 | $(CC) $(APPCFLAGS) -c $< -o $@ | 330 | $(CC) $(APPCFLAGS) -c $< -o $@ |
323 | 331 | ||
332 | $(OBJDIR)/mpegplay.o: $(SIMCOMMON)/mpegplay.c | ||
333 | $(CC) $(CFLAGS) -c $< -o $@ | ||
334 | |||
324 | # these ones are simulator-specific | 335 | # these ones are simulator-specific |
325 | 336 | ||
326 | $(OBJDIR)/%.o: %.c | 337 | $(OBJDIR)/%.o: %.c |
diff --git a/uisimulator/x11/oss_sound.c b/uisimulator/x11/oss_sound.c index e69c403acd..51d85470e7 100644 --- a/uisimulator/x11/oss_sound.c +++ b/uisimulator/x11/oss_sound.c | |||
@@ -21,7 +21,7 @@ | |||
21 | #include <stdio.h> | 21 | #include <stdio.h> |
22 | #include <fcntl.h> | 22 | #include <fcntl.h> |
23 | 23 | ||
24 | #include <linux/soundcard.h> | 24 | #include <sys/soundcard.h> |
25 | #include "../common/sound.h" | 25 | #include "../common/sound.h" |
26 | 26 | ||
27 | /* We want to use the "real" open in this file */ | 27 | /* We want to use the "real" open in this file */ |
@@ -39,7 +39,7 @@ int init_sound(sound_t* sound) { | |||
39 | } | 39 | } |
40 | 40 | ||
41 | int config_sound(sound_t* sound, int sound_freq, int channels) { | 41 | int config_sound(sound_t* sound, int sound_freq, int channels) { |
42 | int format=AFMT_U16_LE; | 42 | int format=AFMT_S16_NE; |
43 | int setting=0x000C000D; // 12 fragments size 8kb ? WHAT IS THIS? | 43 | int setting=0x000C000D; // 12 fragments size 8kb ? WHAT IS THIS? |
44 | 44 | ||
45 | sound->freq=sound_freq; | 45 | sound->freq=sound_freq; |