Skip to content
Permalink
Browse files

Date: Thu, 16 Jan 2003 13:48:31 +0200

From: "Mike Gorchak"

added showing of type of the track, when adding -list arg
  • Loading branch information
slouken committed Jan 20, 2003
1 parent baffb47 commit f4bb2f357d77b9af075f169cbed25c807d9244f4
Showing with 15 additions and 2 deletions.
  1. +15 −2 test/testcdrom.c
@@ -44,15 +44,28 @@ static void ListTracks(SDL_CD *cdrom)
{
int i;
int m, s, f;
char* trtype;

SDL_CDStatus(cdrom);
printf("Drive tracks: %d\n", cdrom->numtracks);
for ( i=0; i<cdrom->numtracks; ++i ) {
FRAMES_TO_MSF(cdrom->track[i].length, &m, &s, &f);
if ( f > 0 )
++s;
printf("\tTrack (index %d) %d: %d:%2.2d\n", i,
cdrom->track[i].id, m, s);
switch(cdrom->track[i].type)
{
case SDL_AUDIO_TRACK:
trtype="audio";
break;
case SDL_DATA_TRACK:
trtype="data";
break;
default:
trtype="unknown";
break;
}
printf("\tTrack (index %d) %d: %d:%2.2d [%s track]\n", i,
cdrom->track[i].id, m, s, trtype);
}
}

0 comments on commit f4bb2f3

Please sign in to comment.