mirror of
https://github.com/google/liblc3.git
synced 2026-04-16 12:45:31 +00:00
compute the sum over the converted buffer
This commit is contained in:
committed by
Antoine SOULIER
parent
48bbd3eacd
commit
f301a22413
@@ -342,7 +342,7 @@ class Encoder(_Base):
|
||||
pcm_buffer = array.array("f", pcm)
|
||||
|
||||
# Invert test to catch NaN
|
||||
if not abs(sum(pcm)) / frame_samples < 2:
|
||||
if not abs(sum(pcm_buffer)) / frame_samples < 2:
|
||||
raise InvalidArgumentError("Out of range PCM input")
|
||||
|
||||
padding = max(pcm_len - frame_samples, 0)
|
||||
|
||||
Reference in New Issue
Block a user