Hi.
This patch makes the generation of rids consistent with those generated
by RMM under Windows for ogg, mp3 and wav files. Flac files are still
inconsistent, because the Windows implimentation fails to ignore
the tags and is therefore incorrect.
Keith.
# HG changeset patch
# User Keith Bennett <[EMAIL PROTECTED]>
# Node ID 8eeea43d29c21a4f525fb6fc6714313f7f7fe0ed
# Parent ef6c13edd3f2ca7cb659aff26c19b1dd95e69bb7
Removed support for ogg-encased flac files since the Karma
does not recognise them.
Changed rid generation of ogg and wav files to be
consistent with those generated under Windows.
diff -r ef6c13edd3f2 -r 8eeea43d29c2 src/rio_rw.c
--- a/src/rio_rw.c Tue Aug 22 09:51:21 2006
+++ b/src/rio_rw.c Tue Aug 22 21:30:34 2006
@@ -567,27 +567,13 @@
if (memcmp(buf, "OggS", 4) == 0) {
mp3->offset += buf[27] + 28;
- if (memcmp(buf+29, "FLAC", 4) == 0) {
- type = TYPE_FLAC;
- fseek(mp3->file, mp3->offset, SEEK_SET);
- fread(buf, 1, 48, mp3->file);
- off = buf[26] + 27;
- while ((buf[off]&0x80) == 0) {
- mp3->offset += off + buf[27];
- fseek(mp3->file, mp3->offset, SEEK_SET);
- fread(buf, 1, 48, mp3->file);
- off = buf[26] + 27;
- }
- mp3->offset += off;
- off = 0;
- for (i=0; i<buf[26]; i++)
- off += buf[27+i];
- mp3->offset += off;
- } else if (memcmp(buf+29, "vorbis", 6) == 0) {
+ if (memcmp(buf+29, "vorbis", 6) == 0) {
type = TYPE_OGG;
fseek(mp3->file, mp3->offset, SEEK_SET);
fread(buf, 1, 48, mp3->file);
- mp3->offset += buf[26] + buf[27] + 28;
+ mp3->offset += buf[26] + 27;
+ for (i=0; i<buf[26]; i++)
+ mp3->offset += buf[27+i];
}
} else if (memcmp(buf, "fLaC", 4) == 0) {
type = TYPE_FLAC;
@@ -609,7 +595,7 @@
return -1;
}
type = TYPE_WAV;
- mp3->offset = wh->RiffSize/1024;
+ mp3->offset = 0;
cleanup(&wh);
} else {
fseek(mp3->file, 0, SEEK_SET);
@@ -626,4 +612,3 @@
{
write_dupes = set;
}
-
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
linux-karma-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-karma-devel