summaryrefslogtreecommitdiffstats
path: root/src/SekaijuDoc.cpp
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2013-09-17 10:38:59 -0700
committerKaz Kylheku <kaz@kylheku.com>2013-09-17 10:38:59 -0700
commitcb6b6dd6f04db2b58d81b395bd3d1c7ae47e65dc (patch)
tree96b867ad7ee09691cfb65757831bcd185f5938f9 /src/SekaijuDoc.cpp
parent844d31616bfd90cf743489897bf2ceb3b72c27e3 (diff)
downloadsekaiju-cb6b6dd6f04db2b58d81b395bd3d1c7ae47e65dc.tar.gz
sekaiju-cb6b6dd6f04db2b58d81b395bd3d1c7ae47e65dc.tar.bz2
sekaiju-cb6b6dd6f04db2b58d81b395bd3d1c7ae47e65dc.zip
Fixing a bug: the accented beat of the metronome does not play reliably.
Steps to reproduce: - rewind the position - press record Sometimes, the accented beat is not heard. I suspected race conditions at first, so I restructured the order of operations in CSekaijuApp::StartRecording so that the MIDI clock is not started until the very end, when all the state variables have been assigned, like m_bPlaying and m_bRecording. I'm keeping these changes. But the real problem was in CSekaijuApp::PlayRecordProc, in the block of code that plays the metronome. There, the check "pSekaijuDoc-&gt;m_lOldTime == pSekaijuDoc-&gt;m_lNewTime" was causing the issue. Although StartRecording sets up this condition, there is no way for the truth of the condition to be maintained through to that block of code. The clock runs freely, and is periodically sampled by the thread whenever it wakes up from sleep. The condition is not necessary.
Diffstat (limited to 'src/SekaijuDoc.cpp')
0 files changed, 0 insertions, 0 deletions