Discussion:
How to get the number of tracks on a disc?
R.M. Morrien
2003-06-07 13:50:14 UTC
Permalink
Hi,

I was wondering if there is a usb call that can give me the number of tracks
that's on a MD.

What I can do now is: try a getTrackName in a for loop from 0-256 and if one
fails stop,
but it seems to me this could be done better if I can ask for the number of
tracks.

This information is not hidden in the disc name is it? If it is: this would
be quite stupid don't
you think? Maybe the disc name is corrupt e.g.

Martijn

_________________________________________________________________
The new MSN 8: advanced junk mail protection and 2 months FREE*
http://join.msn.com/?page=features/junkmail
Michael Davidson
2003-06-10 12:50:51 UTC
Permalink
Post by R.M. Morrien
Hi,
I was wondering if there is a usb call that can give me the number of tracks
that's on a MD.
What I can do now is: try a getTrackName in a for loop from 0-256 and if one
fails stop,
but it seems to me this could be done better if I can ask for the number of
tracks.
This information is not hidden in the disc name is it? If it is: this would
be quite stupid don't
you think? Maybe the disc name is corrupt e.g.
No, there is a call. Send the following to the device.
char request[] = {
0x00, 0x18, 0x06,
0x02, 0x10, 0x10, 0x01,
0x30, 0x00,
0x10, 0x00,
0xff, 0x00,
0x00, 0x00, 0x00, 0x00
};

Then grab the buffer length, ask for the reply and the size is the last byte
of the array

You might want to look at http://www.marcus-brinkmann.de/files/freemd_4.html
for more details.

Loading...