summaryrefslogtreecommitdiff
path: root/src/output/plugins
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2018-07-16 10:15:01 +0200
committerMax Kellermann <max@musicpd.org>2018-07-16 11:04:01 +0200
commit2fb5dbe62bae1e5c0ae57bc56fa55a5ba8b191cb (patch)
tree57ecbeac353a2905ffaa5696a2b72765db660f9e /src/output/plugins
parentd2835e29890e3257238ee2832f3064692040118d (diff)
output/alsa: use spsc_queue::reset()
This method was added in Boost 1.58.
Diffstat (limited to 'src/output/plugins')
-rw-r--r--src/output/plugins/AlsaOutputPlugin.cxx9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/output/plugins/AlsaOutputPlugin.cxx b/src/output/plugins/AlsaOutputPlugin.cxx
index fa440f097..778e9e3c5 100644
--- a/src/output/plugins/AlsaOutputPlugin.cxx
+++ b/src/output/plugins/AlsaOutputPlugin.cxx
@@ -255,11 +255,6 @@ private:
return true;
}
- void ClearRingBuffer() noexcept {
- std::array<uint8_t, 1024> buffer;
- while (ring_buffer->pop(&buffer.front(), buffer.size())) {}
- }
-
int Recover(int err) noexcept;
/**
@@ -789,7 +784,7 @@ AlsaOutput::CancelInternal() noexcept
pcm_export->Reset();
period_buffer.Clear();
- ClearRingBuffer();
+ ring_buffer->reset();
{
const std::lock_guard<Mutex> lock(mutex);
@@ -809,7 +804,7 @@ AlsaOutput::Cancel() noexcept
pcm_export->Reset();
assert(period_buffer.IsEmpty());
- ClearRingBuffer();
+ ring_buffer->reset();
return;
}