1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
|
Description: Add -i option so users can specify cd polling interval.
Patch created for 1.0beta1-2. Converted to quilt for 1.0beta-12.
Bug-Debian: http://bugs.debian.org/25121
Author: Marcelo E. Magallon <mmagallo@debian.org>
Author: Doug Torrance <dtorrance@monmouthcollege.edu>
Last-Update: 2014-07-29
--- a/wmcdplay.cc
+++ b/wmcdplay.cc
@@ -81,6 +81,7 @@
char artwrkf[256]="";
int tsel=1;
int vol=-1; // -1 means don't set volume
+int uinterval_e=UINTERVAL_E;
// X-Windows basics - standard
Atom _XA_GNUSTEP_WM_FUNC;
@@ -226,7 +227,7 @@
}
}
ucount++;
- if(ucount>=((mode==ssNoCD || mode==ssTrayOpen) ? UINTERVAL_E : UINTERVAL_N))
+ if(ucount>=((mode==ssNoCD || mode==ssTrayOpen) ? uinterval_e : UINTERVAL_N))
checkStatus(false);
XFlush(d_display);
usleep(50000);
@@ -364,6 +365,7 @@
fprintf(stderr, " -f artwork_file load the specified artwork file\n");
fprintf(stderr, " -t track_selection set track selection (between 0 and 4)\n");
fprintf(stderr, " -v volume set the cdrom volume (between 0 and 255)\n");
+ fprintf(stderr, " -i interval interval in 1/20 seconds between cd polls when empty\n");
fprintf(stderr, " -l led_color use the specified color for led displays\n");
fprintf(stderr, " -b back_color use the specified color for backgrounds\n");
fprintf(stderr, " -d cd_device use specified device (rather than /dev/cdrom)\n");
@@ -391,6 +393,13 @@
}
continue;
}
+ if(strcmp(argv[i], "-i")==0){
+ if(i<argc-1){
+ i++;
+ sscanf(argv[i], "%i", &uinterval_e);
+ }
+ continue;
+ }
if(strcmp(argv[i], "-f")==0){
artwrk=true;
if(i<argc-1){
|