lint still squawks quite a bit, and it woudl probably be worthwhile
for someone to go through and make all the signedness consistent, but
I think I've got the valuable bits.
earlier, sleep(3) until playing finished)
-also switch to digital mode if an audio device is given on the
cmd line, or the (new) "CDPLAY_DIGITAL" env var is set
(The latter can be used to make digital mode default per system.
As I see it, analog mode is not dead yet - two of three external
DVD drives I looked at have a speaker output.)
try again.
XXX: Should we do this for the other ioctls? Should we default to digital mode?
Definitely the error message is completely unfriendly and should be fixed.
-use AUMODE_PLAY_ALL, from Sergey Svishchev -- this might cause
stuttering if the write to audio can't keep up, but it avoids pauses
if the audio buffer drains out on stop/resume
-The timeout for the raw SCSI command to read audio data
was too small, causing complete failure for me.
-Since the itimer can't do faster than HZ, a too small buffer doesn't
work. Try to calculate a sensible buffer size.
-While it makes sense to deliver data a bit faster than necessary,
it should be not that much that the blocking in the signal handler
hurts interactive response. Allow for 50ms.
-Comment out a sched_yield() in the signal handler - this doesn't
look right.
This is far from being perfect, but it makes digital mode usable for me.
And for Jeremy C. Reed, the author of PR bin/38493.
NetBSD 4.0 will be the first release which supports digital transfer
mode. The feature made it into this release because of the rebranch.
This fixes PR bin/36199 by Andreas Burghardt.
duration of a track. call lba2msf like this:
lba2msf(len - 150, &m, &s, &f);
^^^^^
from rev 1.41 of FreeBSD usr.sbin/cdcontrol/cdcontrol.c, Dmitry Afanasiev.
XXX: note that this is a mis-use of lba2msf() because 'len' is the length
of the track in frames, not a logical block address (lba).
for digital transfer mode, not enabled by default.
To use it: $ cdplay -a /dev/audio (otherwise /dev/sound will be used)
and type "digital" on the interactive mode.
Thank you very much Sergey, it's very useful.
Reviewed and ok by christos@.
to UINT_MAX before scanning, and check for UINT_MAX to detect whether it
was set.
Without this, it is not possible to play the first less than a minute of
a CD using absolute msf addresses.