From e23d5838e79eb7c591f5480fa022f73120ce3f6f Mon Sep 17 00:00:00 2001 From: Tobias Doerffel Date: Mon, 3 Feb 2014 20:11:18 +0100 Subject: [PATCH] Song: removed old action array As of commit c60e7ba8d1a589e66f4bb9ef4c09726b1d6c594f we no longer queue playback actions and process them later, therefore remove old remains. --- include/song.h | 12 ----- src/core/song.cpp | 112 ---------------------------------------------- 2 files changed, 124 deletions(-) diff --git a/include/song.h b/include/song.h index c2ba37fbf..2b85a6ab3 100644 --- a/include/song.h +++ b/include/song.h @@ -354,18 +354,6 @@ private: tick_t m_elapsedTicks; tact_t m_elapsedTacts; - enum Actions - { - ActionStop, - ActionPlaySong, - ActionPlayTrack, - ActionPlayBB, - ActionPlayPattern, - ActionPause, - ActionResumeFromPause - } ; - QVector m_actions; - VstSyncController m_vstSyncController; diff --git a/src/core/song.cpp b/src/core/song.cpp index ebbb0d8f3..241f301a1 100644 --- a/src/core/song.cpp +++ b/src/core/song.cpp @@ -179,118 +179,6 @@ void song::savePos() { timeLine * tl = m_playPos[m_playMode].m_timeLine; - while( !m_actions.empty() ) - { - switch( m_actions.front() ) - { - case ActionStop: - { - m_playing = false; - m_vstSyncController.setPlaybackState( m_exporting ); - m_recording = true; - if( tl != NULL ) - { - - switch( tl->behaviourAtStop() ) - { - case timeLine::BackToZero: - m_playPos[m_playMode].setTicks( 0 ); - m_elapsedMilliSeconds = 0; - break; - - case timeLine::BackToStart: - if( tl->savedPos() >= 0 ) - { - m_playPos[m_playMode].setTicks( - tl->savedPos().getTicks() ); - m_elapsedMilliSeconds = (((tl->savedPos().getTicks())*60*1000/48)/getTempo()); - tl->savePos( -1 ); - } - break; - - case timeLine::KeepStopPosition: - default: - break; - } - - } - else - { - m_playPos[m_playMode].setTicks( 0 ); - m_elapsedMilliSeconds = 0; - } - - m_playPos[m_playMode].setCurrentFrame( 0 ); - - // remove all note-play-handles that are active - engine::mixer()->clear(); - - break; - } - - case ActionPlaySong: - m_playMode = Mode_PlaySong; - m_playing = true; - m_vstSyncController.setPlaybackState( true ); - Controller::resetFrameCounter(); - break; - - case ActionPlayTrack: - m_playMode = Mode_PlayTrack; - m_playing = true; - m_vstSyncController.setPlaybackState( true ); - break; - - case ActionPlayBB: - m_playMode = Mode_PlayBB; - m_playing = true; - m_vstSyncController.setPlaybackState( true ); - break; - - case ActionPlayPattern: - m_playMode = Mode_PlayPattern; - m_playing = true; - m_vstSyncController.setPlaybackState( true ); - break; - - case ActionPause: - m_playing = false;// just set the play-flag - m_vstSyncController.setPlaybackState( m_exporting ); - m_paused = true; - break; - - case ActionResumeFromPause: - m_playing = true;// just set the play-flag - m_vstSyncController.setPlaybackState( true ); - m_paused = false; - break; - } - - // a second switch for saving pos when starting to play - // anything (need pos for restoring it later in certain - // timeline-modes) - switch( m_actions.front() ) - { - case ActionPlaySong: - case ActionPlayTrack: - case ActionPlayBB: - case ActionPlayPattern: - { - if( tl != NULL ) - { - tl->savePos( m_playPos[m_playMode] ); - } - break; - } - - // keep GCC happy... - default: - break; - } - - m_actions.erase( m_actions.begin() ); - } - if( tl != NULL ) { tl->savePos( m_playPos[m_playMode] );