Thomas Schmitt (2018-07-22):
> Your reader program needs to use command READ CD or READ CD MSF.
> mount(8) or dd(1) won't do this. (Also mount(8) would find no filesystem.)

To be accurate, mount only directs the kernel into doing the reads and
looking for filesystems.

There was a kernel patch to treat audio CDs as a kind of filesystem,
presenting all tracks as PCM audio files, but AFAIK it was discontinued.
Since audio CDs lack accurate timing information, reading a track
reliably requires some rather tricky operations that are not wanted in
kernel space.

> Program "mplayer" comes to my mind as potential reader.
> But i am sure the list members can tell more programs which play music
> from CD-DA media.

There are two ways for playing an audio CD.

The CD drive can play the audio CD all by itself. The application only
needs to send commands to start the playback. But it requires an analog
cable from the CD drive to the audio controller. When I had a tower
assembled 17 years ago, the vendor simply forgot to plug it, that's how
important it was then. Nowadays, I am not even sure the connector for
the audio controller will be available, and I do not find the
corresponding mixer.

Or the CD drive can read the audio CD, as you have described, and the
application can send the audio data on the fly to the audio controller.
MPlayer can be complied with that feature, it is invoked using the URL
cdda://. I just checked, and Debian's VLC also has that feature. I
expect most usable music players have it.

But really, it is not the best option. Unless your use case is very
specific, I think you would be better off ripping the CD and then
listening to the resulting file. It would be much more convenient on
many aspects: no noise from the spinning CD, faster seeking, ease of
archival, etc.

The ripping can be done at the drive full speed (or slightly less if you
want a reliable read), which means it takes very little time at all. And
of course, you can start playing the first track before the whole CD is
ripped. If you decide to encode the audio into a lossy codec in order to
keep the file without spending too much disk space (Opus would be the
best choice nowadays, unless you want to be able to play the file on an
old device), it also takes very little time, probably less than the
reading itself.

For reference: uncompressed CD PCM data: 10 Mo/mn, transparent stereo
Opus: <~1 Mo/mn.

Regards,

-- 
  Nicolas George

Attachment: signature.asc
Description: Digital signature

Reply via email to