diff options
author | Tim E. Real <termtech@rogers.com> | 2011-09-21 06:31:12 +0000 |
---|---|---|
committer | Tim E. Real <termtech@rogers.com> | 2011-09-21 06:31:12 +0000 |
commit | 6f6c78229e4e1dee80d36c89c27e2e58e23e0eb3 (patch) | |
tree | 7909c92c92c910bb5a67400c5d363ff3dc896b57 /muse2/muse/song.cpp | |
parent | 279cf178836509085b8cfb1f576f350e9fd28dca (diff) |
Need to get it off the drive: Part canvas drawing speed boosts. Working on meter speed.
Diffstat (limited to 'muse2/muse/song.cpp')
-rw-r--r-- | muse2/muse/song.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/muse2/muse/song.cpp b/muse2/muse/song.cpp index 29ed7023..6a43e457 100644 --- a/muse2/muse/song.cpp +++ b/muse2/muse/song.cpp @@ -61,6 +61,7 @@ #include "al/sig.h" #include "keyevent.h" #include <sys/wait.h> +//#include "utils.h" extern void clearMidiTransforms(); extern void clearMidiInputTransforms(); @@ -1700,6 +1701,21 @@ void Song::setMType(MType t) void Song::beat() { + #if 0 + static double _heartbeatRateTimer = 0.0; + double t = MusEUtil::curTime(); + if(t - _heartbeatRateTimer > 0.0) + { + double rate = 1/ (t - _heartbeatRateTimer); + printf("heartbeat rate:%f\n", rate); + // Results: Song::beat() is not even called sometimes because apparently all the other + // stuff connected to the heartbeat is taking up all the time before the next timer event - + // apparently Song::beat() is called last, or close to last - after the others. (Possible to choose order?) + // With fancy strip meters active, Song::beat() was quiet for long periods of time! + } + _heartbeatRateTimer = t; + #endif + // Keep the sync detectors running... for(int port = 0; port < MIDI_PORTS; ++port) { |