mirror of
https://github.com/romanz/amodem.git
synced 2026-03-27 21:39:06 +08:00
sampling: apply scaling after the loop
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user