test/testcdrom.c
changeset 568 0cd6b268193b
parent 0 74212992fb08
child 613 9c6717a1c66f
     1.1 --- a/test/testcdrom.c	Mon Jan 20 01:08:20 2003 +0000
     1.2 +++ b/test/testcdrom.c	Mon Jan 20 01:35:44 2003 +0000
     1.3 @@ -44,6 +44,7 @@
     1.4  {
     1.5  	int i;
     1.6  	int m, s, f;
     1.7 +	char* trtype;
     1.8  
     1.9  	SDL_CDStatus(cdrom);
    1.10  	printf("Drive tracks: %d\n", cdrom->numtracks);
    1.11 @@ -51,8 +52,20 @@
    1.12  		FRAMES_TO_MSF(cdrom->track[i].length, &m, &s, &f);
    1.13  		if ( f > 0 )
    1.14  			++s;
    1.15 -		printf("\tTrack (index %d) %d: %d:%2.2d\n", i,
    1.16 -					cdrom->track[i].id, m, s);
    1.17 +		switch(cdrom->track[i].type)
    1.18 +		{
    1.19 +		    case SDL_AUDIO_TRACK:
    1.20 +			trtype="audio";
    1.21 +			break;
    1.22 +		    case SDL_DATA_TRACK:
    1.23 +			trtype="data";
    1.24 +			break;
    1.25 +		    default:
    1.26 +			trtype="unknown";
    1.27 +			break;
    1.28 +		}
    1.29 +		printf("\tTrack (index %d) %d: %d:%2.2d [%s track]\n", i,
    1.30 +					cdrom->track[i].id, m, s, trtype);
    1.31  	}
    1.32  }
    1.33