diff options
| author | Adam Boot <rotator@gmail.com> | 2007-03-03 06:08:28 +0000 |
|---|---|---|
| committer | Adam Boot <rotator@gmail.com> | 2007-03-03 06:08:28 +0000 |
| commit | b9a71b305b98a87f747dc1e0cc91324b73693fd1 (patch) | |
| tree | c6e033835b4fc63ad0955ea3124f4b699cc9fd69 /apps/codecs | |
| parent | 411f8198b46764a7c29030f8da1da90dc332308c (diff) | |
| download | rockbox-b9a71b305b98a87f747dc1e0cc91324b73693fd1.zip rockbox-b9a71b305b98a87f747dc1e0cc91324b73693fd1.tar.gz rockbox-b9a71b305b98a87f747dc1e0cc91324b73693fd1.tar.bz2 rockbox-b9a71b305b98a87f747dc1e0cc91324b73693fd1.tar.xz | |
Add get_metadata() and year & comment tag support for SPC.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12563 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs')
| -rw-r--r-- | apps/codecs/spc.c | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/apps/codecs/spc.c b/apps/codecs/spc.c index 12b236c..1cf2009 100644 --- a/apps/codecs/spc.c +++ b/apps/codecs/spc.c @@ -671,14 +671,31 @@ static int LoadID666(unsigned char *buf) { ID666.emulator=*ib; ib++; } else { - int year, month, day; unsigned long tmp; char buf[64]; DEBUGF("text tag detected\n"); - - year=month=day=0; - ib+=11; + + memcpy(buf, ib, 2); + buf[2] = 0; + tmp = 0; + for (i=0;i<2 && buf[i]>='0' && buf[i]<='9';i++) tmp=tmp*10+buf[i]-'0'; + ID666.month = tmp; + ib+=3; + + memcpy(buf, ib, 2); + buf[2] = 0; + tmp = 0; + for (i=0;i<2 && buf[i]>='0' && buf[i]<='9';i++) tmp=tmp*10+buf[i]-'0'; + ID666.day = tmp; + ib+=3; + + memcpy(buf, ib, 4); + buf[4] = 0; + tmp = 0; + for (i=0;i<4 && buf[i]>='0' && buf[i]<='9';i++) tmp=tmp*10+buf[i]-'0'; + ID666.year = tmp; + ib+=5; memcpy(buf, ib, 3); buf[3] = 0; @@ -861,6 +878,8 @@ enum codec_status codec_main(void) ci->id3->title = ID666.song; ci->id3->album = ID666.game; ci->id3->artist = ID666.artist; + ci->id3->year = ID666.year; + ci->id3->comment = ID666.comments; reset_profile_timers(); } |