Open ehw opened 7 years ago
Another thing in regards to audio data. We could also report on the track duration and maybe the codec used, or a bitrate too.
As a side note, if a user wants to perform ecc on an individual file (no .cue), treat the input file as a data track if and only if the file extensions is .bin or .iso (or any other disc backup format with error correction data).
It currently detects data tracks with ISO 9660 file formats, even if you specify them directly. Also, sectors containing ECC data follow a specific format so there is no need to look at the filename for data tracks.
The first track is always a data track, while subsequent tracks are always audio/CDDA tracks.
It seems that there are CDs with more than one data track. For example Christmas Nights for Saturn:
FILE "Christmas Nights Into Dreams... (USA) (DW0566).bin" BINARY
TRACK 01 MODE1/2352
INDEX 01 00:00:00
TRACK 02 MODE2/2352
INDEX 00 02:58:24
INDEX 01 03:00:24
TRACK 03 AUDIO
INDEX 00 27:55:48
INDEX 01 27:57:48
TRACK 04 AUDIO
INDEX 00 28:07:53
INDEX 01 28:09:53
TRACK 05 AUDIO
INDEX 00 28:19:55
INDEX 01 28:21:55
TRACK 06 AUDIO
INDEX 00 28:33:08
INDEX 01 28:35:08
TRACK 07 AUDIO
INDEX 00 28:49:18
INDEX 01 28:51:18
TRACK 08 AUDIO
INDEX 00 30:59:67
INDEX 01 31:01:67
TRACK 09 AUDIO
INDEX 00 33:05:13
INDEX 01 33:07:13
TRACK 10 AUDIO
INDEX 00 35:13:13
INDEX 01 35:15:13
TRACK 11 AUDIO
INDEX 00 37:18:13
INDEX 01 37:20:13
TRACK 12 AUDIO
INDEX 00 39:10:50
INDEX 01 39:12:50
TRACK 13 AUDIO
INDEX 00 40:39:51
INDEX 01 40:41:51
TRACK 14 AUDIO
INDEX 00 41:41:53
INDEX 01 41:43:53
TRACK 15 AUDIO
INDEX 00 42:38:69
INDEX 01 42:40:69
TRACK 16 AUDIO
INDEX 00 43:36:28
INDEX 01 43:38:28
TRACK 17 AUDIO
INDEX 00 44:26:34
INDEX 01 44:28:34
TRACK 18 AUDIO
INDEX 00 45:54:64
INDEX 01 45:56:64
TRACK 19 AUDIO
INDEX 00 51:11:31
INDEX 01 51:13:31
TRACK 20 AUDIO
INDEX 00 56:26:60
INDEX 01 56:28:60
romkit currently does this for Dreamcast GDI, but romkit should do this for any .cue file as well. While .cue files can come in different formats, the general layout is the same in each. The first track is always a data track, while subsequent tracks are always audio/CDDA tracks. Audio tracks can be represented in transcoded formats as well as raw .bin files (which is the case of Redumps). romkit should simply identify the first track as data and perform ecc as usual, and if subsequent tracks are found first check if they are transcoded format (.mp3/.fla/.flac/.ape/,wav are all I've found) and do no ecc on them (simply identify them as transcoded audio tracks by extension). If however the subsequent tracks are in a .raw or .bin format, identify them automatically as audio tracks but also do ecc on each track based on the .cue.
As a side note, if a user wants to perform ecc on an individual file (no .cue), treat the input file as a data track if and only if the file extensions is .bin or .iso (or any other disc backup format with error correction data).