From 4242a34ad6f569d2a135e272c8beb95af2aea127 Mon Sep 17 00:00:00 2001 From: Linus Nielsen Feltzing Date: Thu, 8 Jul 2004 10:12:39 +0000 Subject: 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 --- uisimulator/x11/Makefile | 13 ++++++++++++- uisimulator/x11/oss_sound.c | 4 ++-- 2 files changed, 14 insertions(+), 3 deletions(-) (limited to 'uisimulator/x11') 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 endif COMMONSRCS = io.c +ifeq ($(HAVE_MPEG_PLAY),1) + SOUNDSRC = mpegplay.c oss_sound.c + LDFLAGS += $(SOUND_LDFLAGS) + CFLAGS += $(SOUND_CFLAGS) -DHAVE_MPEG_PLAY +else + SOUNDSRC = +endif + FIRMSRCS = $(LCDSRSC) id3.c debug.c usb.c mpeg.c mp3_playback.c power.c\ powermgmt.c panic.c mp3data.c sprintf.c buffer.c timefuncs.c @@ -117,7 +125,7 @@ endif SRCS = screenhack.c uibasic.c resources.c visual.c lcd-x11.c stubs.c \ button-x11.c thread.c sim_icons.c $(APPS) $(MENUS) $(FIRMSRCS) \ - $(COMMONSRCS) lcd-common.c fmradio.c + $(COMMONSRCS) $(SOUNDSRC) lcd-common.c fmradio.c ROCKSRC := $(wildcard $(APPDIR)/plugins/*.c) ROCKS := $(ROCKSRC:$(APPDIR)/plugins/%.c=$(OBJDIR)/%.rock) @@ -321,6 +329,9 @@ $(OBJDIR)/lcd-player.o: $(DRIVERS)/lcd-player.c $(OBJDIR)/radio.o: $(RECDIR)/radio.c $(CC) $(APPCFLAGS) -c $< -o $@ +$(OBJDIR)/mpegplay.o: $(SIMCOMMON)/mpegplay.c + $(CC) $(CFLAGS) -c $< -o $@ + # these ones are simulator-specific $(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 @@ #include #include -#include +#include #include "../common/sound.h" /* We want to use the "real" open in this file */ @@ -39,7 +39,7 @@ int init_sound(sound_t* sound) { } int config_sound(sound_t* sound, int sound_freq, int channels) { - int format=AFMT_U16_LE; + int format=AFMT_S16_NE; int setting=0x000C000D; // 12 fragments size 8kb ? WHAT IS THIS? sound->freq=sound_freq; -- cgit v1.2.3