output/alsa: don't lock the mutex in CancelInternal()
CancelInternal() doesn't need to be protected because it is called synchronously from Cancel().
This commit is contained in:
parent
020371f145
commit
b477f86c92
@ -796,6 +796,9 @@ AlsaOutput::Drain()
|
|||||||
inline void
|
inline void
|
||||||
AlsaOutput::CancelInternal() noexcept
|
AlsaOutput::CancelInternal() noexcept
|
||||||
{
|
{
|
||||||
|
/* this method doesn't need to lock the mutex because while it
|
||||||
|
runs, the calling thread is blocked inside Cancel() */
|
||||||
|
|
||||||
must_prepare = true;
|
must_prepare = true;
|
||||||
|
|
||||||
snd_pcm_drop(pcm);
|
snd_pcm_drop(pcm);
|
||||||
@ -804,10 +807,7 @@ AlsaOutput::CancelInternal() noexcept
|
|||||||
period_buffer.Clear();
|
period_buffer.Clear();
|
||||||
ring_buffer->reset();
|
ring_buffer->reset();
|
||||||
|
|
||||||
{
|
active = false;
|
||||||
const std::lock_guard<Mutex> lock(mutex);
|
|
||||||
active = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
MultiSocketMonitor::Reset();
|
MultiSocketMonitor::Reset();
|
||||||
defer_invalidate_sockets.Cancel();
|
defer_invalidate_sockets.Cancel();
|
||||||
|
Loading…
Reference in New Issue
Block a user