MCPcopy Create free account
hub / github.com/BambooTracker/BambooTracker / streamCountUp

Method streamCountUp

BambooTracker/playback.cpp:287–314  ·  view source on GitHub ↗

Stream events **********/

Source from the content-addressed store, hash-verified

285
286/********** Stream events **********/
287int PlaybackManager::streamCountUp()
288{
289 std::lock_guard<std::mutex> lock(mutex_);
290
291 int state = tickCounter_.lock()->countUp();
292
293 if (state > 0) { // Tick process in playback
294 checkValidPosition();
295 tickProcess(state);
296 }
297 else if (!state) { // Step process in playback
298 checkValidPosition();
299 if (stepDown()) {
300 stepProcess();
301 if (!isFindNextStep_) findNextStep();
302 }
303 else if (!isPlayingStep()) {
304 stopPlay();
305 }
306 }
307 else { // Stop playback
308 for (auto& attrib : songStyle_.trackAttribs) {
309 opnaCtrl_->tickEvent(attrib.source, attrib.channelInSource);
310 }
311 }
312
313 return state;
314}
315
316bool PlaybackManager::stepDown()
317{

Callers 2

MainWindowMethod · 0.45

Calls 2

countUpMethod · 0.80
tickEventMethod · 0.80

Tested by

no test coverage detected