mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
Accept FS#10570 by Jason Yu. Adds metadata parsing for NSF files.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22557 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
a4e2d1f071
commit
e4c30bdf0e
4 changed files with 6 additions and 10 deletions
|
@ -172,6 +172,7 @@ metadata/wavpack.c
|
|||
metadata/a52.c
|
||||
metadata/asap.c
|
||||
metadata/rm.c
|
||||
metadata/nsf.c
|
||||
#endif
|
||||
#ifdef HAVE_TAGCACHE
|
||||
tagcache.c
|
||||
|
|
|
@ -215,10 +215,6 @@ bool mp3info(struct mp3entry *entry, const char *filename)
|
|||
*/
|
||||
bool get_metadata(struct mp3entry* id3, int fd, const char* trackname)
|
||||
{
|
||||
#if CONFIG_CODEC == SWCODEC
|
||||
unsigned char* buf;
|
||||
#endif
|
||||
|
||||
/* Clear the mp3entry to avoid having bogus pointers appear */
|
||||
memset(id3, 0, sizeof(struct mp3entry));
|
||||
|
||||
|
@ -356,15 +352,11 @@ bool get_metadata(struct mp3entry* id3, int fd, const char* trackname)
|
|||
break;
|
||||
|
||||
case AFMT_NSF:
|
||||
buf = (unsigned char *)id3->path;
|
||||
if ((lseek(fd, 0, SEEK_SET) < 0) || ((read(fd, buf, 8)) < 8))
|
||||
if (!get_nsf_metadata(fd, id3))
|
||||
{
|
||||
DEBUGF("lseek or read failed\n");
|
||||
DEBUGF("get_nsf_metadata error\n");
|
||||
return false;
|
||||
}
|
||||
id3->vbr = false;
|
||||
id3->filesize = filesize(fd);
|
||||
if (memcmp(buf,"NESM",4) && memcmp(buf,"NSFE",4)) return false;
|
||||
break;
|
||||
|
||||
case AFMT_AIFF:
|
||||
|
|
|
@ -39,3 +39,5 @@ bool get_a52_metadata(int fd, struct mp3entry* id3);
|
|||
bool get_asf_metadata(int fd, struct mp3entry* id3);
|
||||
bool get_asap_metadata(int fd, struct mp3entry* id3);
|
||||
bool get_rm_metadata(int fd, struct mp3entry* id3);
|
||||
bool get_nsf_metadata(int fd, struct mp3entry* id3);
|
||||
|
||||
|
|
|
@ -489,6 +489,7 @@ Rosso Maltese
|
|||
Amaury Pouly
|
||||
Laurent Papier
|
||||
Johannes Boy
|
||||
Jason Yu
|
||||
|
||||
The libmad team
|
||||
The wavpack team
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue