From d33d297fc5838e26ddceb96f9e512f49115072db Mon Sep 17 00:00:00 2001 From: Roman Zeyde Date: Sat, 9 Aug 2014 19:54:09 +0300 Subject: [PATCH] sampling: apply scaling after the loop --- amodem/sampling.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/amodem/sampling.py b/amodem/sampling.py index a1a8dbd..ec10a3a 100644 --- a/amodem/sampling.py +++ b/amodem/sampling.py @@ -58,12 +58,12 @@ class Sampler(object): self.index += 1 self.offset += self.freq - frame[frame_index] = np.dot(coeffs, self.buff) * self.gain + frame[frame_index] = np.dot(coeffs, self.buff) count = frame_index + 1 except StopIteration: pass - return frame[:count] + return frame[:count] * self.gain def resample(src, dst, df=0.0):