-Change: If a loop is already playing, let the play loop command set the looping status.

git-svn-id: http://svn.fuzzle.org/mloop/mloop/trunk@9 ba049829-c6ef-42ef-81ac-908dd8d2e907
remotes/git-svn@10
petern 2009-07-22 07:43:21 +00:00
parent 4ba9b7cc26
commit bfa83efd94
1 changed files with 4 additions and 0 deletions

View File

@ -68,6 +68,10 @@ void Loop::SetLength(jack_nframes_t length)
void Loop::Start(bool loop)
{
if (m_state == LS_PLAY_LOOP || m_state == LS_PLAY_ONCE) {
m_state = loop ? LS_PLAY_LOOP : LS_PLAY_ONCE;
}
if (m_state != LS_IDLE) return;
if (m_length == 0) return;