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
This commit is contained in:
parent
d660e9655c
commit
5bea40f1de
1 changed files with 10 additions and 12 deletions
22
apps/mpeg.c
22
apps/mpeg.c
|
@ -40,6 +40,7 @@
|
||||||
#include "sound.h"
|
#include "sound.h"
|
||||||
#include "bitswap.h"
|
#include "bitswap.h"
|
||||||
#include "appevents.h"
|
#include "appevents.h"
|
||||||
|
#include "playlist.h"
|
||||||
#include "cuesheet.h"
|
#include "cuesheet.h"
|
||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
#ifndef SIMULATOR
|
#ifndef SIMULATOR
|
||||||
|
@ -87,12 +88,6 @@ extern enum /* from mp3_playback.c */
|
||||||
} mpeg_mode;
|
} mpeg_mode;
|
||||||
#endif /* CONFIG_CODEC == MAS3587F */
|
#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_PLAY 1
|
||||||
#define MPEG_STOP 2
|
#define MPEG_STOP 2
|
||||||
#define MPEG_PAUSE 3
|
#define MPEG_PAUSE 3
|
||||||
|
@ -914,6 +909,8 @@ static int new_file(int steps)
|
||||||
int start = 0;
|
int start = 0;
|
||||||
int i;
|
int i;
|
||||||
struct trackdata *track;
|
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
|
/* 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.
|
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 {
|
do {
|
||||||
const char *trackname;
|
trackname = playlist_peek(start + steps, name_buf, sizeof(name_buf));
|
||||||
|
|
||||||
trackname = playlist_peek( start + steps );
|
|
||||||
if ( !trackname )
|
if ( !trackname )
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
@ -2653,13 +2648,14 @@ void audio_set_recording_options(struct audio_recording_options *options)
|
||||||
void audio_play(long offset)
|
void audio_play(long offset)
|
||||||
{
|
{
|
||||||
#ifdef SIMULATOR
|
#ifdef SIMULATOR
|
||||||
|
char name_buf[MAX_PATH+1];
|
||||||
const char* trackname;
|
const char* trackname;
|
||||||
int steps=0;
|
int steps=0;
|
||||||
|
|
||||||
is_playing = true;
|
is_playing = true;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
trackname = playlist_peek( steps );
|
trackname = playlist_peek(steps, name_buf, sizeof(name_buf));
|
||||||
if (!trackname)
|
if (!trackname)
|
||||||
break;
|
break;
|
||||||
if(mp3info(&taginfo, trackname)) {
|
if(mp3info(&taginfo, trackname)) {
|
||||||
|
@ -2740,12 +2736,13 @@ void audio_next(void)
|
||||||
queue_remove_from_head(&mpeg_queue, MPEG_NEED_DATA);
|
queue_remove_from_head(&mpeg_queue, MPEG_NEED_DATA);
|
||||||
queue_post(&mpeg_queue, MPEG_NEXT, 0);
|
queue_post(&mpeg_queue, MPEG_NEXT, 0);
|
||||||
#else /* SIMULATOR */
|
#else /* SIMULATOR */
|
||||||
|
char name_buf[MAX_PATH+1];
|
||||||
const char* file;
|
const char* file;
|
||||||
int steps = 1;
|
int steps = 1;
|
||||||
int index;
|
int index;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
file = playlist_peek(steps);
|
file = playlist_peek(steps, name_buf, sizeof(name_buf));
|
||||||
if(!file)
|
if(!file)
|
||||||
break;
|
break;
|
||||||
if(mp3info(&taginfo, file)) {
|
if(mp3info(&taginfo, file)) {
|
||||||
|
@ -2769,12 +2766,13 @@ void audio_prev(void)
|
||||||
queue_remove_from_head(&mpeg_queue, MPEG_NEED_DATA);
|
queue_remove_from_head(&mpeg_queue, MPEG_NEED_DATA);
|
||||||
queue_post(&mpeg_queue, MPEG_PREV, 0);
|
queue_post(&mpeg_queue, MPEG_PREV, 0);
|
||||||
#else /* SIMULATOR */
|
#else /* SIMULATOR */
|
||||||
|
char name_buf[MAX_PATH+1];
|
||||||
const char* file;
|
const char* file;
|
||||||
int steps = -1;
|
int steps = -1;
|
||||||
int index;
|
int index;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
file = playlist_peek(steps);
|
file = playlist_peek(steps, name_buf, sizeof(name_buf));
|
||||||
if(!file)
|
if(!file)
|
||||||
break;
|
break;
|
||||||
if(mp3info(&taginfo, file)) {
|
if(mp3info(&taginfo, file)) {
|
||||||
|
|
Loading…
Reference in a new issue