summaryrefslogtreecommitdiffstats
path: root/apps/mpeg.c
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2010-08-22 20:58:32 +0000
committerJens Arnold <amiconn@rockbox.org>2010-08-22 20:58:32 +0000
commit5bea40f1de850f473998165f957cd59fd5fa1fa3 (patch)
treeb602412cec7758b34025c78f7077e2993eef937c /apps/mpeg.c
parentd660e9655c3654dc80e4db4d29108e7ae5c11f7f (diff)
downloadrockbox-5bea40f1de850f473998165f957cd59fd5fa1fa3.tar.gz
rockbox-5bea40f1de850f473998165f957cd59fd5fa1fa3.zip
Fix HWCODEC playback broken in r27773. mpeg.c declared playlist functions on its own instead of including playlist.h due to its history, and now they got out of sync...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27860 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/mpeg.c')
-rw-r--r--apps/mpeg.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/apps/mpeg.c b/apps/mpeg.c
index 1ba491ce89..62fda5e3cb 100644
--- a/apps/mpeg.c
+++ b/apps/mpeg.c
@@ -40,6 +40,7 @@
#include "sound.h"
#include "bitswap.h"
#include "appevents.h"
+#include "playlist.h"
#include "cuesheet.h"
#include "settings.h"
#ifndef SIMULATOR
@@ -87,12 +88,6 @@ extern enum /* from mp3_playback.c */
} mpeg_mode;
#endif /* CONFIG_CODEC == MAS3587F */
-extern const char* playlist_peek(int steps);
-extern bool playlist_check(int steps);
-extern int playlist_next(int steps);
-extern int playlist_amount(void);
-extern int playlist_update_resume_info(const struct mp3entry* id3);
-
#define MPEG_PLAY 1
#define MPEG_STOP 2
#define MPEG_PAUSE 3
@@ -914,6 +909,8 @@ static int new_file(int steps)
int start = 0;
int i;
struct trackdata *track;
+ char name_buf[MAX_PATH+1];
+ const char *trackname;
/* Find out how many steps to advance. The load_ahead_index field tells
us how many playlist entries it had to skip to get to a valid one.
@@ -929,9 +926,7 @@ static int new_file(int steps)
}
do {
- const char *trackname;
-
- trackname = playlist_peek( start + steps );
+ trackname = playlist_peek(start + steps, name_buf, sizeof(name_buf));
if ( !trackname )
return -1;
@@ -2653,13 +2648,14 @@ void audio_set_recording_options(struct audio_recording_options *options)
void audio_play(long offset)
{
#ifdef SIMULATOR
+ char name_buf[MAX_PATH+1];
const char* trackname;
int steps=0;
is_playing = true;
do {
- trackname = playlist_peek( steps );
+ trackname = playlist_peek(steps, name_buf, sizeof(name_buf));
if (!trackname)
break;
if(mp3info(&taginfo, trackname)) {
@@ -2740,12 +2736,13 @@ void audio_next(void)
queue_remove_from_head(&mpeg_queue, MPEG_NEED_DATA);
queue_post(&mpeg_queue, MPEG_NEXT, 0);
#else /* SIMULATOR */
+ char name_buf[MAX_PATH+1];
const char* file;
int steps = 1;
int index;
do {
- file = playlist_peek(steps);
+ file = playlist_peek(steps, name_buf, sizeof(name_buf));
if(!file)
break;
if(mp3info(&taginfo, file)) {
@@ -2769,12 +2766,13 @@ void audio_prev(void)
queue_remove_from_head(&mpeg_queue, MPEG_NEED_DATA);
queue_post(&mpeg_queue, MPEG_PREV, 0);
#else /* SIMULATOR */
+ char name_buf[MAX_PATH+1];
const char* file;
int steps = -1;
int index;
do {
- file = playlist_peek(steps);
+ file = playlist_peek(steps, name_buf, sizeof(name_buf));
if(!file)
break;
if(mp3info(&taginfo, file)) {