summaryrefslogtreecommitdiff
path: root/libhfp/soundio-alsa.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libhfp/soundio-alsa.cpp')
-rw-r--r--libhfp/soundio-alsa.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/libhfp/soundio-alsa.cpp b/libhfp/soundio-alsa.cpp
index 6c14c6a..9565684 100644
--- a/libhfp/soundio-alsa.cpp
+++ b/libhfp/soundio-alsa.cpp
@@ -1370,9 +1370,12 @@ public:
}
virtual void SndPushOutput(bool nonblock) {
- /* Wake up the output thread if it's sleeping */
+ /*
+ * Wake up the output thread if it's sleeping and
+ * there's something for it to do
+ */
m_lock.Lock();
- if (m_play_idle)
+ if (m_play_idle && m_output.TotalFill())
m_lock.Signal();
m_lock.Unlock();
}