aboutsummaryrefslogtreecommitdiffstats
path: root/alc/backends/alsa.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2020-12-12 15:10:25 -0800
committerChris Robinson <[email protected]>2020-12-12 15:10:25 -0800
commitbb597546e1db888120b0da5c23dbf249a281e6aa (patch)
tree4da6e4e72e2032eaa28cf5b6f1d57b44617a2f4d /alc/backends/alsa.cpp
parente179bf0a12e80eb41041469bc04ba1fbcffe11e8 (diff)
Make sure to stop ALSA playback when the backend stops
Diffstat (limited to 'alc/backends/alsa.cpp')
-rw-r--r--alc/backends/alsa.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/alc/backends/alsa.cpp b/alc/backends/alsa.cpp
index 20ed0e78..a07d006b 100644
--- a/alc/backends/alsa.cpp
+++ b/alc/backends/alsa.cpp
@@ -840,6 +840,9 @@ void AlsaPlayback::stop()
mThread.join();
mBuffer.clear();
+ int err{snd_pcm_drop(mPcmHandle)};
+ if(err < 0)
+ ERR("snd_pcm_drop failed: %s\n", snd_strerror(err));
}
ClockLatency AlsaPlayback::getClockLatency()