From 06fc12ca7c3847de59211b891c325c02bd2f1795 Mon Sep 17 00:00:00 2001 From: Kostya Shishkov Date: Sat, 3 Oct 2020 15:38:51 +0200 Subject: [PATCH] ape: zero samples in silent frames --- nihav-llaudio/src/codecs/ape.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/nihav-llaudio/src/codecs/ape.rs b/nihav-llaudio/src/codecs/ape.rs index a89f0c5..773c116 100644 --- a/nihav-llaudio/src/codecs/ape.rs +++ b/nihav-llaudio/src/codecs/ape.rs @@ -181,6 +181,11 @@ impl NADecoder for APEDecoder { (self.decode_stereo)(&mut coder, &mut self.left, &mut self.right)?; self.fmode.filter_stereo(&mut self.left, &mut self.right); } + } else { + for l in self.left.iter_mut() { *l = 0; } + if self.is_stereo { + for r in self.right.iter_mut() { *r = 0; } + } } if self.version >= 0x3990 || nblocks == self.blocksperframe { -- 2.39.5