Little cda question

i know i’m gonna be de-moderator-ed and maybe banne for asking this but… why tf when i open a cd-a i find only a bunch of 3kb files?

you mean audio cd “Track 01.cda”?
The fake file generated by windows driver as a pointer to cd audio tracks?
The one that has ‘RIFF’ file headers?

is that what you ask?

huh?
:bigsmile: :bigsmile: :bigsmile:

Originally posted by lombok ijo
you mean audio cd “Track 01.cda”?
The fake file generated by windows driver as a pointer to cd audio tracks?

i thought abut this myself… my real question was “WHY?!?”.
thnx guys :bigsmile:

cda files are generally riff resources. the riff id of .cda file is
“cdda” (43h, 44h, 44h, 41h). they contain only one data block
called "fmt " (66h, 6dh, 74h, 20h). in current version of .cda file,
this block is 24 bytes long. here’s structure of it:

offset length description
00h 02h cda file version. currently equals 1. if it has
other value, following data may be out of date.
02h 02h number of track.
04h 04h cd disc serial number (the one stored in cdplayer.ini)
08h 04h beginning of the track in hsg format.
0ch 04h length of the track in hsg format.
10h 04h beginning of the track in red-book format.
14h 04h length of the track in red-book format.

as you see, time is represented in two formats: hsg and red-book.
hsg can be calculated as following:

time = minute * 4500 + second * 75 + frame

red-book is much easier to use, because it contains minutes,
seconds and frames in unmodified form, byte-packed:

offset length description
00h 01h frame
01h 01h second
02h 01h minute
03h 01h not used

an example file. first part is a hex dump
of the file, the second is the explanation of the fields.

52 49 46 46 24 00 00 00 43 44 44 41 66 6d 74 20 riff$…cddafmt
18 00 00 00 01 00 04 00 b8 24 f6 00 f7 11 01 00 …$…
b4 5c 00 00 0a 25 0f 00 20 10 05 00 …%… …

01 00 - first version of cda file :slight_smile:
04 00 - fourth track
b8 24 f6 00 - serial number of cd in cdplayer.ini is [f623b8]

f7 11 01 00 - begining of track in hsg format
b4 5c 00 00 - length of track in hsg format

0a 25 0f 00 - begining of track in red-book format (15:37)
20 10 05 00 - length of track in red-book format (05:16)

:eek:
wow! thank you a lot of times, belvedere :slight_smile:

Originally posted by Mr. Belvedere
[B]
b8 24 f6 00 - serial number of cd in cdplayer.ini is [f623b8]

[/B]

I wonder how windows get this number…
its not cdda id…