[xiph-commits] r15180 - trunk/cdparanoia/interface

xiphmont at svn.xiph.org xiphmont at svn.xiph.org
Wed Aug 13 12:34:19 PDT 2008


Author: xiphmont
Date: 2008-08-13 12:34:18 -0700 (Wed, 13 Aug 2008)
New Revision: 15180

Modified:
   trunk/cdparanoia/interface/scsi_interface.c
Log:
Another test for forrest


Modified: trunk/cdparanoia/interface/scsi_interface.c
===================================================================
--- trunk/cdparanoia/interface/scsi_interface.c	2008-08-13 19:02:48 UTC (rev 15179)
+++ trunk/cdparanoia/interface/scsi_interface.c	2008-08-13 19:34:18 UTC (rev 15180)
@@ -14,6 +14,12 @@
 
 /* hook */
 static int Dummy (cdrom_drive *d,int s){
+  if(d->opened){
+    fprintf(stderr,"Disabling cache\n");
+    set_read_ahead(d,
+		   cdda_track_firstsector(d,1),
+		   cdda_track_lastsector(d,d->tracks));
+  }
   return(0);
 }
 
@@ -611,7 +617,7 @@
   return(0);
 }
 
-static int set_read_ahead (cdrom_drive *d, int start, int end){
+int set_read_ahead (cdrom_drive *d, int start, int end){
   int err;
   unsigned char sense[SG_MAX_SENSE];
   unsigned char cmd[12]={0xA7, /* SET READ AHEAD */
@@ -1077,8 +1083,6 @@
 
   retry_count=0;
   
-  set_read_ahead(d,begin-1,begin+sectors);
-
   while(1) {
     if((err=map(d,(p?buffer:NULL),begin,sectors,sense))){
       if(d->report_all){



More information about the commits mailing list