Commit 01a4bd3a authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

Don't emit audio when simply refreshing monitor.

Related to #467
parent 4b9dd5b1
...@@ -646,6 +646,7 @@ void GLWidget::wheelEvent(QWheelEvent *event) ...@@ -646,6 +646,7 @@ void GLWidget::wheelEvent(QWheelEvent *event)
void GLWidget::requestSeek(int position) void GLWidget::requestSeek(int position)
{ {
m_consumer->set("scrub_audio", 1);
m_producer->seek(position); m_producer->seek(position);
if (!qFuzzyIsNull(m_producer->get_speed())) { if (!qFuzzyIsNull(m_producer->get_speed())) {
m_consumer->purge(); m_consumer->purge();
...@@ -659,6 +660,7 @@ void GLWidget::requestSeek(int position) ...@@ -659,6 +660,7 @@ void GLWidget::requestSeek(int position)
void GLWidget::requestRefresh() void GLWidget::requestRefresh()
{ {
if (m_producer && qFuzzyIsNull(m_producer->get_speed())) { if (m_producer && qFuzzyIsNull(m_producer->get_speed())) {
m_consumer->set("scrub_audio", 0);
m_refreshTimer.start(); m_refreshTimer.start();
} }
} }
...@@ -1616,6 +1618,7 @@ void GLWidget::switchPlay(bool play, double speed) ...@@ -1616,6 +1618,7 @@ void GLWidget::switchPlay(bool play, double speed)
} }
m_producer->set_speed(speed); m_producer->set_speed(speed);
m_consumer->start(); m_consumer->start();
m_consumer->set("scrub_audio", 0);
m_consumer->set("refresh", 1); m_consumer->set("refresh", 1);
} else { } else {
emit paused(); emit paused();
...@@ -1640,6 +1643,7 @@ bool GLWidget::playZone(bool loop) ...@@ -1640,6 +1643,7 @@ bool GLWidget::playZone(bool loop)
if (m_consumer->is_stopped()) { if (m_consumer->is_stopped()) {
m_consumer->start(); m_consumer->start();
} }
m_consumer->set("scrub_audio", 0);
m_consumer->set("refresh", 1); m_consumer->set("refresh", 1);
m_isZoneMode = true; m_isZoneMode = true;
m_isLoopMode = loop; m_isLoopMode = loop;
...@@ -1660,6 +1664,7 @@ bool GLWidget::loopClip() ...@@ -1660,6 +1664,7 @@ bool GLWidget::loopClip()
if (m_consumer->is_stopped()) { if (m_consumer->is_stopped()) {
m_consumer->start(); m_consumer->start();
} }
m_consumer->set("scrub_audio", 0);
m_consumer->set("refresh", 1); m_consumer->set("refresh", 1);
m_isZoneMode = true; m_isZoneMode = true;
m_isLoopMode = true; m_isLoopMode = true;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment