07-18-2010, 07:11 AM
(07-18-2010, 06:43 AM)gid15 Wrote: According to the WAV file specification, the "fact" chunk gives the sample length:nice idea.
http://www-mmsp.ece.mcgill.ca/Documents/.../WAVE.html
length 4: Chunk ID: "fact"
length 4: Chunk size (minimum 4, it seems the PSP is using 8)
length 4: Number of Samples
This value seems to be different for files having the same length. But this chunk is not always located at the same place in the header. So the approach would be to search for the "fact" chunk and take the 32-bit "Number of Samples" following it.
Examples based on hyakki's post:
Atrac-0000C7CC-000420FF.at3 ("Number of Samples" 32-bit value at 3C)
Atrac-001DC5E4-006CD401.at3 ("Number of Samples" 32-bit value at 50)
Does this method work on CC?
Testing on CC:
Code:
###########################################_DUPS_#########################################
Atrac-17759x-1536617947x-1435890748.at3 ---> Atrac-17759.at3 CRC32: 683924957
Atrac-17759x1937771214x1380160688.at3 ---> Atrac-17759.at3 CRC32: 2570913708
Atrac-31634x-1584297101x541116802.at3 ---> Atrac-31634.at3 CRC32: 1543312282
Atrac-31634x-2020536832x1378449617.at3 ---> Atrac-31634.at3 CRC32: 870595897
Atrac-416427x-490584339x315634795.at3 ---> Atrac-416427.at3 CRC32: 4114682445
Atrac-416427x1428059941x1368478490.at3 ---> Atrac-416427.at3 CRC32: 2775905477
Atrac-74529x-2135713462x13224292.at3 ---> Atrac-74529.at3 CRC32: 1635851086
Atrac-74529x903750956x-2141885254.at3 ---> Atrac-74529.at3 CRC32: 1754929989