summaryrefslogtreecommitdiff
path: root/apps/metadata.c
diff options
context:
space:
mode:
authorAdam Gashlin <agashlin@gmail.com>2007-01-25 18:06:17 +0000
committerAdam Gashlin <agashlin@gmail.com>2007-01-25 18:06:17 +0000
commit5d20c9d1216f1ccce1921884bfa4c0737a6f69ee (patch)
tree00b7db687a040a03db99bf983c148bb1ff69bc2e /apps/metadata.c
parent2e020e6e1e12dc471c99399cdbc85006b482f6be (diff)
adding NSF (NES music) codec
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12112 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/metadata.c')
-rw-r--r--apps/metadata.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/apps/metadata.c b/apps/metadata.c
index acd8de38e3..d02e81a014 100644
--- a/apps/metadata.c
+++ b/apps/metadata.c
@@ -2012,6 +2012,17 @@ bool get_metadata(struct track_info* track, int fd, const char* trackname,
}
break;
+ case AFMT_NSF:
+ buf = track->id3.path;
+ if ((lseek(fd, 0, SEEK_SET) < 0) || ((read(fd, buf, 8)) < 8))
+ {
+ DEBUGF("lseek or read failed\n");
+ return false;
+ }
+ track->id3.vbr = false;
+ track->id3.filesize = filesize(fd);
+ if (memcmp(buf,"NESM",4) && memcmp(buf,"NSFE",4)) return false;
+ break;
case AFMT_AIFF:
if (!get_aiff_metadata(fd, &(track->id3)))