summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPixel <Pixel>2002-08-25 18:37:36 +0000
committerPixel <Pixel>2002-08-25 18:37:36 +0000
commite2abcc08b4362b4d3769119d302b13409162d607 (patch)
tree1e835ec0e4b4b3857bbe5ebe3061679fbe2f367b /lib
parentb418ce925762c671d78799a2ec34fedcc968cf57 (diff)
CD Reading working?
Diffstat (limited to 'lib')
-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++;