summaryrefslogtreecommitdiff
path: root/firmware/mpeg.c
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2004-07-27 14:10:48 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2004-07-27 14:10:48 +0000
commitf4f4111536951feed392a6869575ed80ffe87c4d (patch)
tree8fe0b78734d37939ea6a20e1e2f8a867bbb31ad4 /firmware/mpeg.c
parentde0100fafb1075286f0a7a7390eb6ce8a3fbe1a0 (diff)
downloadrockbox-f4f4111536951feed392a6869575ed80ffe87c4d.tar.gz
rockbox-f4f4111536951feed392a6869575ed80ffe87c4d.zip
Added possibility to select the priority of the ID3 tags
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4962 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/mpeg.c')
-rw-r--r--firmware/mpeg.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/firmware/mpeg.c b/firmware/mpeg.c
index 8f0612c693..a54866e0c2 100644
--- a/firmware/mpeg.c
+++ b/firmware/mpeg.c
@@ -107,6 +107,8 @@ struct id3tag
107static struct id3tag *id3tags[MAX_ID3_TAGS]; 107static struct id3tag *id3tags[MAX_ID3_TAGS];
108static struct id3tag _id3tags[MAX_ID3_TAGS]; 108static struct id3tag _id3tags[MAX_ID3_TAGS];
109 109
110static bool v1first = false;
111
110static unsigned int current_track_counter = 0; 112static unsigned int current_track_counter = 0;
111static unsigned int last_track_counter = 0; 113static unsigned int last_track_counter = 0;
112 114
@@ -736,7 +738,7 @@ static int add_track_to_tag_list(char *filename)
736 { 738 {
737 /* grab id3 tag of new file and 739 /* grab id3 tag of new file and
738 remember where in memory it starts */ 740 remember where in memory it starts */
739 if(mp3info(&(t->id3), filename)) 741 if(mp3info(&(t->id3), filename, v1first))
740 { 742 {
741 DEBUGF("Bad mp3\n"); 743 DEBUGF("Bad mp3\n");
742 return -1; 744 return -1;
@@ -1985,6 +1987,11 @@ static void mpeg_thread(void)
1985static struct mp3entry taginfo; 1987static struct mp3entry taginfo;
1986#endif /* #ifdef SIMULATOR */ 1988#endif /* #ifdef SIMULATOR */
1987 1989
1990void mpeg_id3_options(bool _v1first)
1991{
1992 v1first = _v1first;
1993}
1994
1988struct mp3entry* mpeg_current_track() 1995struct mp3entry* mpeg_current_track()
1989{ 1996{
1990#ifdef SIMULATOR 1997#ifdef SIMULATOR
@@ -2443,7 +2450,7 @@ void mpeg_play(int offset)
2443 trackname = playlist_peek( steps ); 2450 trackname = playlist_peek( steps );
2444 if (!trackname) 2451 if (!trackname)
2445 break; 2452 break;
2446 if(mp3info(&taginfo, trackname)) { 2453 if(mp3info(&taginfo, trackname, v1first)) {
2447 /* bad mp3, move on */ 2454 /* bad mp3, move on */
2448 if(++steps > playlist_amount()) 2455 if(++steps > playlist_amount())
2449 break; 2456 break;
@@ -2518,7 +2525,7 @@ void mpeg_next(void)
2518 file = playlist_peek(steps); 2525 file = playlist_peek(steps);
2519 if(!file) 2526 if(!file)
2520 break; 2527 break;
2521 if(mp3info(&taginfo, file)) { 2528 if(mp3info(&taginfo, file, v1first)) {
2522 if(++steps > playlist_amount()) 2529 if(++steps > playlist_amount())
2523 break; 2530 break;
2524 continue; 2531 continue;
@@ -2546,7 +2553,7 @@ void mpeg_prev(void)
2546 file = playlist_peek(steps); 2553 file = playlist_peek(steps);
2547 if(!file) 2554 if(!file)
2548 break; 2555 break;
2549 if(mp3info(&taginfo, file)) { 2556 if(mp3info(&taginfo, file, v1first)) {
2550 steps--; 2557 steps--;
2551 continue; 2558 continue;
2552 } 2559 }