[patch] cdparanoia sample offset inconsistency

Eric Lesage <[email protected]> Fri, 11 Dec 2009 03:31:40 -0500 (EST)
Newsgroups gmane.comp.audio.cd-paranoia.devel
Message-ID <[email protected]>
  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.

--84543234-1631020589-1259564109=:17210
Content-Type: TEXT/PLAIN; FORMAT=flowed; CHARSET=US-ASCII
Content-ID: <[email protected]>

Hello,

Apologies if this is a duplicate. I've sent a previous version to the list 
but it appears it did not get through. The version of the patch included 
herein is better anyway.

I've encountered a problem when using the -O (--sample-offset) option. 
Currently, the code checks whether the specified offset is more than 588 
samples, and if so biases the sectors in the (internal) TOC so that the 
offset becomes less than 588.

However, this creates an inconsistency when the span is analyzed: the span 
might both refer to (corrected) values from the TOC (e.g. end of disk) and 
uncorrected values (e.g. absolute sector positions).

E.g.: [.2000]- (read from sector 2000 to end of disk).

The included patch fixes this by adding the offset in sectors specified 
using absolute positions.

Best regards,

-- 
Eric Lesage
--84543234-1631020589-1259564109=:17210
Content-Type: TEXT/PLAIN; charset=US-ASCII; name=cdparanoia-offset-fix.patch
Content-Transfer-Encoding: BASE64
Content-ID: <[email protected]>
Content-Description: 
Content-Disposition: attachment; filename=cdparanoia-offset-fix.patch

SW5kZXg6IGludGVyZmFjZS9jZGRhX2ludGVyZmFjZS5oDQo9PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09DQotLS0gaW50ZXJmYWNlL2NkZGFfaW50ZXJmYWNlLmgJ
KHJldmlzaW9uIDE2NzQ1KQ0KKysrIGludGVyZmFjZS9jZGRhX2ludGVyZmFj
ZS5oCSh3b3JraW5nIGNvcHkpDQpAQCAtNjYsNiArNjYsOCBAQA0KICAgbG9u
ZyBhdWRpb19maXJzdF9zZWN0b3I7DQogICBsb25nIGF1ZGlvX2xhc3Rfc2Vj
dG9yOw0KIA0KKyAgbG9uZyBtYW51YWxfc2VjdG9yX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
ZXR1cm4gZC0+bWFudWFsX3NlY3Rvcl9vZmZzZXQ7IC8qIGFjY291bnQgZm9y
IG1hbnVhbCBjb3JyZWN0aW9uICovDQogICAgICAgZWxzZQ0KICAgICAgICBy
ZXR1cm4oY2RkYV90cmFja19maXJzdHNlY3RvcihkLGkrMSkpOw0KICAgICB9
DQpJbmRleDogbWFpbi5jDQo9PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQotLS0g
bWFpbi5jCShyZXZpc2lvbiAxNjc0NSkNCisrKyBtYWluLmMJKHdvcmtpbmcg
Y29weSkNCkBAIC0xMDg3LDYgKzEwODcsOSBAQA0KICAgICB9DQogICB9DQog
DQorICAvKiBTYXZlIGl0IHRvIHJlcG9ydCBjb3JyZWN0IG9mZnNldHMgbGF0
ZXIuICovDQorICBkLT5tYW51YWxfc2VjdG9yX29mZnNldCA9IHRvY19vZmZz
ZXQ7DQorDQogICBpZih0b2NfYmlhcyl7DQogICAgIHRvY19vZmZzZXQ9LWNk
ZGFfdHJhY2tfZmlyc3RzZWN0b3IoZCwxKTsNCiAgIH0NCg==

--84543234-1631020589-1259564109=:17210
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Paranoia-dev mailing list
[email protected]
http://lists.xiph.org/mailman/listinfo/paranoia-dev

--84543234-1631020589-1259564109=:17210--