Commit 2fb5dbe6 authored by Max Kellermann's avatar Max Kellermann

output/alsa: use spsc_queue::reset()

This method was added in Boost 1.58.
parent d2835e29
......@@ -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;
}
......
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