From bfa83efd9403f6d715a67e00b5afddc9c572560a Mon Sep 17 00:00:00 2001 From: petern Date: Wed, 22 Jul 2009 07:43:21 +0000 Subject: [PATCH] -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 --- src/loop.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/loop.cpp b/src/loop.cpp index 9951aea..f6fa331 100644 --- a/src/loop.cpp +++ b/src/loop.cpp @@ -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;