output/alsa: use spsc_queue::reset()
This method was added in Boost 1.58.
This commit is contained in:
parent
d2835e2989
commit
2fb5dbe62b
@ -255,11 +255,6 @@ private:
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ClearRingBuffer() noexcept {
|
|
||||||
std::array<uint8_t, 1024> buffer;
|
|
||||||
while (ring_buffer->pop(&buffer.front(), buffer.size())) {}
|
|
||||||
}
|
|
||||||
|
|
||||||
int Recover(int err) noexcept;
|
int Recover(int err) noexcept;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -789,7 +784,7 @@ AlsaOutput::CancelInternal() noexcept
|
|||||||
|
|
||||||
pcm_export->Reset();
|
pcm_export->Reset();
|
||||||
period_buffer.Clear();
|
period_buffer.Clear();
|
||||||
ClearRingBuffer();
|
ring_buffer->reset();
|
||||||
|
|
||||||
{
|
{
|
||||||
const std::lock_guard<Mutex> lock(mutex);
|
const std::lock_guard<Mutex> lock(mutex);
|
||||||
@ -809,7 +804,7 @@ AlsaOutput::Cancel() noexcept
|
|||||||
|
|
||||||
pcm_export->Reset();
|
pcm_export->Reset();
|
||||||
assert(period_buffer.IsEmpty());
|
assert(period_buffer.IsEmpty());
|
||||||
ClearRingBuffer();
|
ring_buffer->reset();
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user