diff layer/TimeRulerLayer.cpp @ 30:ea6fe8cfcdd5

* Add the Note layer for pianoroll-type display of note-type data * Complete the MIDI file importer (well, nearly -- it would be nice to be able to import the non-note data as other sorts of models, and that's not done yet). * Minor refactoring in RealTime etc
author Chris Cannam
date Fri, 10 Feb 2006 17:51:36 +0000
parents 2d5005f2b3d9
children ad214997dddb
line wrap: on
line diff
--- a/layer/TimeRulerLayer.cpp	Wed Feb 08 17:59:16 2006 +0000
+++ b/layer/TimeRulerLayer.cpp	Fri Feb 10 17:51:36 2006 +0000
@@ -185,7 +185,7 @@
     long ms = rt.sec * 1000 + rt.msec();
     ms = (ms / incms) * incms - incms;
 
-    RealTime incRt = RealTime(incms / 1000, (incms % 1000) * 1000000);
+    RealTime incRt = RealTime::fromMilliseconds(incms);
     long incFrame = RealTime::realTime2Frame(incRt, sampleRate);
     int incX = incFrame / zoomLevel;
     int ticks = 10;
@@ -207,7 +207,7 @@
 
     while (1) {
 
-	rt = RealTime(ms / 1000, (ms % 1000) * 1000000);
+	rt = RealTime::fromMilliseconds(ms);
 	ms += incms;
 
 	long frame = RealTime::realTime2Frame(rt, sampleRate);