From f993365447d8dc5bb28c76a003cecd045c3abaf7 Mon Sep 17 00:00:00 2001 From: Jörg Hohensohn Date: Mon, 5 Jan 2004 20:42:51 +0000 Subject: Moved the low-level playback functionality into a new, separate module "mp3_playback". This e.g. allows to export a memory playback API to the plugins, opens the door to games with sound, UI sounds, etc. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4192 a1c6a512-1295-4272-9138-f99709370657 --- apps/main.c | 35 +++++++++++++++++++---------------- apps/recorder/recording.c | 1 + apps/screens.c | 1 + apps/settings.c | 1 + apps/sound_menu.c | 2 +- apps/status.c | 2 +- apps/wps.c | 1 + 7 files changed, 25 insertions(+), 18 deletions(-) (limited to 'apps') diff --git a/apps/main.c b/apps/main.c index 04154f54fe..d6be594d07 100644 --- a/apps/main.c +++ b/apps/main.c @@ -37,6 +37,7 @@ #include "serial.h" #endif #include "mpeg.h" +#include "mp3_playback.h" #include "main_menu.h" #include "thread.h" #include "settings.h" @@ -78,14 +79,15 @@ void init(void) sleep(HZ/2); tree_init(); playlist_init(); - mpeg_init( global_settings.volume, - global_settings.bass, - global_settings.treble, - global_settings.balance, - global_settings.loudness, - global_settings.bass_boost, - global_settings.avc, - global_settings.channel_config ); + mp3_init( global_settings.volume, + global_settings.bass, + global_settings.treble, + global_settings.balance, + global_settings.loudness, + global_settings.bass_boost, + global_settings.avc, + global_settings.channel_config ); + mpeg_init(); while (button_get(false) != 0) ; /* Empty the keyboard buffer */ } @@ -197,14 +199,15 @@ void init(void) /* No buffer allocation (see buffer.c) may take place after the call to mpeg_init() since the mpeg thread takes the rest of the buffer space */ - mpeg_init( global_settings.volume, - global_settings.bass, - global_settings.treble, - global_settings.balance, - global_settings.loudness, - global_settings.bass_boost, - global_settings.avc, - global_settings.channel_config ); + mp3_init( global_settings.volume, + global_settings.bass, + global_settings.treble, + global_settings.balance, + global_settings.loudness, + global_settings.bass_boost, + global_settings.avc, + global_settings.channel_config ); + mpeg_init(); /* no auto-rolo on startup any more, but I leave it here for reference */ #if 0 diff --git a/apps/recorder/recording.c b/apps/recorder/recording.c index bc26ff8495..c1a5f96ab6 100644 --- a/apps/recorder/recording.c +++ b/apps/recorder/recording.c @@ -26,6 +26,7 @@ #include "system.h" #include "lcd.h" #include "mpeg.h" +#include "mp3_playback.h" #include "mas.h" #include "button.h" #include "kernel.h" diff --git a/apps/screens.c b/apps/screens.c index 8f7881a916..1b269d93bc 100644 --- a/apps/screens.c +++ b/apps/screens.c @@ -26,6 +26,7 @@ #include "icons.h" #include "font.h" #include "mpeg.h" +#include "mp3_playback.h" #include "usb.h" #include "settings.h" #include "status.h" diff --git a/apps/settings.c b/apps/settings.c index 35e75d12ca..b08ed8475d 100644 --- a/apps/settings.c +++ b/apps/settings.c @@ -31,6 +31,7 @@ #include "backlight.h" #include "lcd.h" #include "mpeg.h" +#include "mp3_playback.h" #include "string.h" #include "ata.h" #include "fat.h" diff --git a/apps/sound_menu.c b/apps/sound_menu.c index 557013df8a..11a5581ecb 100644 --- a/apps/sound_menu.c +++ b/apps/sound_menu.c @@ -23,7 +23,7 @@ #include "lcd.h" #include "menu.h" #include "button.h" -#include "mpeg.h" +#include "mp3_playback.h" #include "settings.h" #include "status.h" #include "screens.h" diff --git a/apps/status.c b/apps/status.c index 68d6ac74c1..65eff70e81 100644 --- a/apps/status.c +++ b/apps/status.c @@ -24,7 +24,7 @@ #include "thread.h" #include "settings.h" #include "status.h" -#include "mpeg.h" +#include "mp3_playback.h" #include "wps.h" #ifdef HAVE_RTC #include "timefuncs.h" diff --git a/apps/wps.c b/apps/wps.c index 10cc0c00fb..9e988d3721 100644 --- a/apps/wps.c +++ b/apps/wps.c @@ -33,6 +33,7 @@ #include "wps.h" #include "wps-display.h" #include "mpeg.h" +#include "mp3_playback.h" #include "usb.h" #include "status.h" #include "main_menu.h" -- cgit v1.2.3