diff src/xs_sidplay.h @ 472:3f02945a0c48

Cleanups.
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 25 Jan 2007 05:58:05 +0000
parents 6963982fcbb6
children 99f05a74de5b
line wrap: on
line diff
--- a/src/xs_sidplay.h	Thu Jan 25 03:51:01 2007 +0000
+++ b/src/xs_sidplay.h	Thu Jan 25 05:58:05 2007 +0000
@@ -67,34 +67,21 @@
 	i = myStatus->tuneInfo;
 	i->sidModel = myInfo.sidModel;
 
-	if ((myStatus->currSong >= 1) && (myStatus->currSong < i->nsubTunes)) {
-		t_xs_subtuneinfo *t = &(i->subTunes[myStatus->currSong - 1]);
+XSDEBUG("%s[%d]: %d, %d\n", i->sidFilename, myStatus->currSong, myInfo.songSpeed, myInfo.clockSpeed);
+
+	if ((myStatus->currSong > 0) && (myStatus->currSong <= i->nsubTunes)) {
+		gint tmpSpeed = -1;
 		
-		switch (myInfo.songSpeed) {
-		case SIDTUNE_SPEED_VBI:
-			switch (myInfo.clockSpeed) {
-			case SIDTUNE_CLOCK_PAL:
-				t->tuneSpeed = 50;
-				break;
-			
-			case SIDTUNE_CLOCK_NTSC:
-				t->tuneSpeed = 60;
-				break;
-			
-			default:
-				t->tuneSpeed = -1;
-				break;
-			}
-			break;
-			
-		case SIDTUNE_SPEED_CIA_1A:
-			t->tuneSpeed = 60;
-			break;
-			
+		switch (myInfo.clockSpeed) {
+		case SIDTUNE_CLOCK_PAL: tmpSpeed = 50; break;
+		case SIDTUNE_CLOCK_NTSC: tmpSpeed = 60; break;
 		default:
-			t->tuneSpeed = -1;
+			if (myInfo.songSpeed != 0)
+				tmpSpeed = myInfo.songSpeed;
 			break;
 		}
+			
+		i->subTunes[myStatus->currSong - 1].tuneSpeed = tmpSpeed;
 	}
 
 	return TRUE;