diff options
-rw-r--r-- | src/output/plugins/AlsaOutputPlugin.cxx | 2 | ||||
-rw-r--r-- | src/output/plugins/OssOutputPlugin.cxx | 4 | ||||
-rw-r--r-- | src/pcm/PcmExport.hxx | 6 |
3 files changed, 12 insertions, 0 deletions
diff --git a/src/output/plugins/AlsaOutputPlugin.cxx b/src/output/plugins/AlsaOutputPlugin.cxx index 90b74c0bb..341802bb3 100644 --- a/src/output/plugins/AlsaOutputPlugin.cxx +++ b/src/output/plugins/AlsaOutputPlugin.cxx @@ -826,6 +826,8 @@ AlsaOutput::Cancel() must_prepare = true; snd_pcm_drop(pcm); + + pcm_export->Reset(); } inline void diff --git a/src/output/plugins/OssOutputPlugin.cxx b/src/output/plugins/OssOutputPlugin.cxx index 7c51d435f..d02a8263b 100644 --- a/src/output/plugins/OssOutputPlugin.cxx +++ b/src/output/plugins/OssOutputPlugin.cxx @@ -659,6 +659,10 @@ OssOutput::Cancel() ioctl(fd, SNDCTL_DSP_RESET, 0); DoClose(); } + +#ifdef AFMT_S24_PACKED + pcm_export->Reset(); +#endif } inline size_t diff --git a/src/pcm/PcmExport.hxx b/src/pcm/PcmExport.hxx index 7102ff32f..e7cbf9f08 100644 --- a/src/pcm/PcmExport.hxx +++ b/src/pcm/PcmExport.hxx @@ -150,6 +150,12 @@ struct PcmExport { Params params); /** + * Reset the filter's state, e.g. drop/flush buffers. + */ + void Reset() { + } + + /** * Calculate the size of one output frame. */ gcc_pure |