mirror of
https://github.com/jketterl/openwebrx.git
synced 2026-04-20 22:05:13 +00:00
prevent an endless loop when client has problematic audio
This commit is contained in:
parent
b2d4046d8a
commit
819790cbc8
1 changed files with 2 additions and 0 deletions
|
|
@ -530,6 +530,8 @@ class dsp(object):
|
|||
(self.decimation, self.last_decimation) = self.get_decimation(self.samp_rate, self.get_audio_rate())
|
||||
|
||||
def get_decimation(self, input_rate, output_rate):
|
||||
if output_rate <= 0:
|
||||
raise ValueError("invalid output rate: {rate}".format(rate=output_rate))
|
||||
decimation = 1
|
||||
target_rate = output_rate
|
||||
# wideband fm has a much higher frequency deviation (75kHz).
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue