Based on the patch from Debian by Marcelo E. Magallon <mmaga...@debian.org> [1], which fixed Debian bug #25121.
[1] http://sources.debian.net/src/wmcdplay/1.0beta1-13/debian/patches/add_interval_option.patch/ [2] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=25121 --- wmcdplay/wmcdplay.cc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/wmcdplay/wmcdplay.cc b/wmcdplay/wmcdplay.cc index 7d205ac..6e0c21d 100644 --- a/wmcdplay/wmcdplay.cc +++ b/wmcdplay/wmcdplay.cc @@ -81,6 +81,7 @@ bool artwrk=false; 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 @@ int main(int argc, char **argv) } } 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 @@ void scanArgs(int argc, char **argv){ 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 @@ void scanArgs(int argc, char **argv){ } 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){ -- 2.1.0 -- To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.