changeset 568:0cd6b268193b

Date: Thu, 16 Jan 2003 13:48:31 +0200 From: "Mike Gorchak" added showing of type of the track, when adding -list arg
author Sam Lantinga <slouken@libsdl.org>
date Mon, 20 Jan 2003 01:35:44 +0000
parents 969fbd4dcd4e
children e8063c656626
files test/testcdrom.c
diffstat 1 files changed, 15 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/test/testcdrom.c	Mon Jan 20 01:08:20 2003 +0000
+++ b/test/testcdrom.c	Mon Jan 20 01:35:44 2003 +0000
@@ -44,6 +44,7 @@
 {
 	int i;
 	int m, s, f;
+	char* trtype;
 
 	SDL_CDStatus(cdrom);
 	printf("Drive tracks: %d\n", cdrom->numtracks);
@@ -51,8 +52,20 @@
 		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);
 	}
 }