summaryrefslogtreecommitdiff
path: root/lib/cdreader.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/cdreader.cpp')
-rw-r--r--lib/cdreader.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/cdreader.cpp b/lib/cdreader.cpp
index a501b6d..5363251 100644
--- a/lib/cdreader.cpp
+++ b/lib/cdreader.cpp
@@ -96,16 +96,22 @@ void cdreader::getsector(void *buf, int sec) throw (GeneralException) {
struct cdrom_msf * msf = (struct cdrom_msf *) buf;
if (sec >= 0)
sector = sec;
+
+ fprintf(stderr, "Reading sector %i\n", sector);
+ sector += 150;
+
msf->cdmsf_min0 = sector /CD_SECS /CD_FRAMES;
msf->cdmsf_sec0 = (sector /CD_FRAMES)%CD_SECS;
msf->cdmsf_frame0= sector %CD_FRAMES;
msf->cdmsf_min1 = (sector+1)/CD_SECS /CD_FRAMES;
msf->cdmsf_sec1 = ((sector+1)/CD_FRAMES)%CD_SECS;
msf->cdmsf_frame1= (sector+1)%CD_FRAMES;
+
+ sector -= 150;
if (ioctl(GetHandle(), CDROMREADRAW, buf) < 0) {
- throw GeneralException(String("unable to read cd sector: ") + strerror(errno));
+ throw GeneralException(String("unable to read cd sector ") + sector + ": " + strerror(errno));
}
sector++;