Commit Graph

12 Commits

Author SHA1 Message Date
Matteo Cypriani 21ab587686 Update copyright dates 2018-05-06 00:10:23 +02:00
Matteo Cypriani 9f29662cbf Implement --no-strip-subchannel 2018-05-05 23:39:54 +02:00
Matteo Cypriani c3c2726537 Pass &str instead of &String 2016-12-08 20:57:28 -05:00
Matteo Cypriani e801140625 Handle 2448-byte sectors
Handle images that have 2448-byte sectors, i.e. 2352 audio bytes + 96
sub-channel bytes.
2016-12-08 20:57:28 -05:00
Matteo Cypriani 6ee363064b Refactoring: add copy_raw_audio() 2016-12-08 20:57:16 -05:00
Matteo Cypriani 5a6feec1d6 Add description strings for some errors 2016-12-08 13:03:33 -05:00
Matteo Cypriani 2bf7a1db2d Refactor {first,last}_audio_byte() 2016-12-08 13:03:33 -05:00
Matteo Cypriani 90cf6b8ed8 Read audio data up to last track's end if possible
The audio data is now read up to the last track's end, rather than to
the NRG footer ("first chunk offset"), unless there are no DAOX tracks.
This should be strictly equivalent in normal cases.
2016-12-08 13:03:33 -05:00
Matteo Cypriani 5604778455 Fix audio data extraction
The audio data was initially read and written by chunks of 2352 bytes,
which is the usual sector size for audio CDs. However, this didn't work
on images with a 2448-byte sector size (2352 bytes data + 96 bytes
sub-channel data): we would end up reading data from the NRG footer.

The data is now read/written by 4 MiB (which is faster anyway), and we
make sure to read the remaining bytes if the audio data size is not a
multiple of 4 MiB.
2016-12-08 12:27:34 -05:00
Matteo Cypriani 4b92eb0239 Improve handling of output file names
* Use PathBuf operations to generate output file names.
* Output files are now written to the working directory.
* The cue sheet contains only the image's base name, not the full path.
2016-12-07 16:06:10 -05:00
Matteo Cypriani 3f03a6c37b Add copyright & license 2016-12-06 22:52:31 -05:00
Matteo Cypriani 2e74951628 Audio data extraction 2016-12-06 21:32:51 -05:00