diff options
author | Chris Robinson <[email protected]> | 2020-12-12 15:10:25 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2020-12-12 15:10:25 -0800 |
commit | bb597546e1db888120b0da5c23dbf249a281e6aa (patch) | |
tree | 4da6e4e72e2032eaa28cf5b6f1d57b44617a2f4d /alc/backends/alsa.cpp | |
parent | e179bf0a12e80eb41041469bc04ba1fbcffe11e8 (diff) |
Make sure to stop ALSA playback when the backend stops
Diffstat (limited to 'alc/backends/alsa.cpp')
-rw-r--r-- | alc/backends/alsa.cpp | 3 |
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() |