From 1661e4291e14540e521b4dd5e8c8b225e9e56a60 Mon Sep 17 00:00:00 2001 From: JoeLametta Date: Fri, 18 Sep 2020 11:58:18 +0000 Subject: [PATCH] Emit warning when the subcode's pre-emphasis flag of a track differs from the ToC's one In the future I'd like to make sure this information is included in the logfile too (maybe also in the cue sheet). Related to issue #296. Signed-off-by: JoeLametta --- whipper/program/cdrdao.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/whipper/program/cdrdao.py b/whipper/program/cdrdao.py index 0bb0de0..6c9043b 100644 --- a/whipper/program/cdrdao.py +++ b/whipper/program/cdrdao.py @@ -22,6 +22,8 @@ _BEGIN_CDRDAO_RE = re.compile(r"-" * 60) _LAST_TRACK_RE = re.compile(r"^[ ]?(?P[0-9]*)") _LEADOUT_RE = re.compile( r"^Leadout AUDIO\s*[0-9]\s*[0-9]*:[0-9]*:[0-9]*\([0-9]*\)") +_SUBCODE_EMPHASIS_LINE = ("Pre-emphasis flag of track differs from TOC - " + "toc file contains TOC setting.") class ProgressParser: @@ -55,6 +57,10 @@ class ProgressParser: "found %d Q sub-channels with CRC errors" % (self.currentTrack, int(crc_s.group('channels')))) + # TODO: add subcode pre-emphasis info for each track to logger too + if _SUBCODE_EMPHASIS_LINE in line: + logger.warning(_SUBCODE_EMPHASIS_LINE) + self.oldline = line