Originally Posted by thilaga
Thanks for your reply.
I understood now.
1. How do the default players of Linux plays the audio CD and it displays the track info. For eg: if the CD contains 15 tracks, then the player says 15 tracks and displays the song duration for each track.
I am a bit over my head here, because I simply never looked too deep into multimedia stuff. It's really not my field. However I think that the ToC for audiocds contain at least the following data:
- the total lenght
- number of tracks
- offset for each track
With this info you can compute the duration for each track. I have no idea what API would I use in, let's say, C language to work with cdaudio. Never needed that. But it shouldn't be hard to figure if that's what you seek here.
2. Is there a possibility to read TOC's from audio CD without CD-Text in linux.
Yes, sure. In command line I'd use cdparanoia like this:
$ cdparanoia -d /dev/sr0 -Q
cdparanoia III release 10.2 (September 11, 2008)
Table of contents (audio tracks only):
track length begin copy pre ch
1. 61580 [13:41.05] 0 [00:00.00] no no 2
2. 47160 [10:28.60] 61580 [13:41.05] no no 2
3. 20465 [04:32.65] 108740 [24:09.65] no no 2
4. 53865 [11:58.15] 129205 [28:42.55] no no 2
5. 22335 [04:57.60] 183070 [40:40.70] no no 2
6. 25525 [05:40.25] 205405 [45:38.55] no no 2
TOTAL 230930 [51:19.05] (audio only)
Just change /dev/sr0 by whatever your cdrom reader device node is.
3. I am able to open the contents of the audio CD as a hex file in linux. I am not sure about the format of the audio CD. Like nth byte to (n+10) corresponds to TOC of audio CD and the remaining are uncompressed raw audio data. If the format of the audio CD is known, might be I can retrieve the track info according to the format.
I don't know much about this. All I think I know is that each session needs a proper ToC, and each one takes around 14 mb or so. The audio is recorded as raw pcm, 16 bits, stereo, 44khz and -important- as little endian.
I guess that the whole format is specified in detail in the red book, however if I am not mistaken sony holds the rights over that and won't probably give a copy away for free.
Probably someone else around can give a better insight on this.