summaryrefslogtreecommitdiff
path: root/uisimulator/x11
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2004-07-08 10:12:39 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2004-07-08 10:12:39 +0000
commit4242a34ad6f569d2a135e272c8beb95af2aea127 (patch)
treed779ca10bc00d9353adfe63f6365ecf5702ba9d4 /uisimulator/x11
parentc685b35611e9be2a761d863de8d7c5124576a12d (diff)
downloadrockbox-4242a34ad6f569d2a135e272c8beb95af2aea127.tar.gz
rockbox-4242a34ad6f569d2a135e272c8beb95af2aea127.zip
Patch #961687 by Eric Lassauge, MP3 playback using libmad in the X11 simulator
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4849 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'uisimulator/x11')
-rw-r--r--uisimulator/x11/Makefile13
-rw-r--r--uisimulator/x11/oss_sound.c4
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
101endif 101endif
102COMMONSRCS = io.c 102COMMONSRCS = io.c
103 103
104ifeq ($(HAVE_MPEG_PLAY),1)
105 SOUNDSRC = mpegplay.c oss_sound.c
106 LDFLAGS += $(SOUND_LDFLAGS)
107 CFLAGS += $(SOUND_CFLAGS) -DHAVE_MPEG_PLAY
108else
109 SOUNDSRC =
110endif
111
104FIRMSRCS = $(LCDSRSC) id3.c debug.c usb.c mpeg.c mp3_playback.c power.c\ 112FIRMSRCS = $(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
118SRCS = screenhack.c uibasic.c resources.c visual.c lcd-x11.c stubs.c \ 126SRCS = 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
122ROCKSRC := $(wildcard $(APPDIR)/plugins/*.c) 130ROCKSRC := $(wildcard $(APPDIR)/plugins/*.c)
123ROCKS := $(ROCKSRC:$(APPDIR)/plugins/%.c=$(OBJDIR)/%.rock) 131ROCKS := $(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
41int config_sound(sound_t* sound, int sound_freq, int channels) { 41int 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;