inline nmux_memory since i've never seen the need to change it
This commit is contained in:
parent
5a7c12dfac
commit
3696272ef7
@ -284,8 +284,6 @@ Note: if you experience audio underruns while CPU usage is 100%, you can:
|
|||||||
# using the auto squelch.
|
# using the auto squelch.
|
||||||
#squelch_auto_margin = 10 # in dB
|
#squelch_auto_margin = 10 # in dB
|
||||||
|
|
||||||
nmux_memory = 50 # in megabytes. This sets the approximate size of the circular buffer used by nmux.
|
|
||||||
|
|
||||||
#google_maps_api_key = ""
|
#google_maps_api_key = ""
|
||||||
|
|
||||||
# how long should positions be visible on the map?
|
# how long should positions be visible on the map?
|
||||||
|
@ -146,7 +146,6 @@ defaultConfig = PropertyLayer(
|
|||||||
waterfall_auto_min_range=50,
|
waterfall_auto_min_range=50,
|
||||||
tuning_precision=2,
|
tuning_precision=2,
|
||||||
squelch_auto_margin=10,
|
squelch_auto_margin=10,
|
||||||
nmux_memory=50,
|
|
||||||
google_maps_api_key="",
|
google_maps_api_key="",
|
||||||
map_position_retention_time=2 * 60 * 60,
|
map_position_retention_time=2 * 60 * 60,
|
||||||
decoding_queue_workers=2,
|
decoding_queue_workers=2,
|
||||||
|
@ -13,10 +13,9 @@ class DirectSource(SdrSource, metaclass=ABCMeta):
|
|||||||
self.sleepOnRestart()
|
self.sleepOnRestart()
|
||||||
self.start()
|
self.start()
|
||||||
|
|
||||||
def getEventNames(self):
|
def nmux_memory(self):
|
||||||
return super().getEventNames() + [
|
# in megabytes. This sets the approximate size of the circular buffer used by nmux.
|
||||||
"nmux_memory",
|
return 50
|
||||||
]
|
|
||||||
|
|
||||||
def getNmuxCommand(self):
|
def getNmuxCommand(self):
|
||||||
props = self.sdrProps
|
props = self.sdrProps
|
||||||
@ -24,13 +23,10 @@ class DirectSource(SdrSource, metaclass=ABCMeta):
|
|||||||
nmux_bufcnt = nmux_bufsize = 0
|
nmux_bufcnt = nmux_bufsize = 0
|
||||||
while nmux_bufsize < props["samp_rate"] / 4:
|
while nmux_bufsize < props["samp_rate"] / 4:
|
||||||
nmux_bufsize += 4096
|
nmux_bufsize += 4096
|
||||||
while nmux_bufsize * nmux_bufcnt < props["nmux_memory"] * 1e6:
|
while nmux_bufsize * nmux_bufcnt < self.nmux_memory() * 1e6:
|
||||||
nmux_bufcnt += 1
|
nmux_bufcnt += 1
|
||||||
if nmux_bufcnt == 0 or nmux_bufsize == 0:
|
if nmux_bufcnt == 0 or nmux_bufsize == 0:
|
||||||
raise ValueError(
|
raise ValueError("Error: unable to calculate nmux buffer parameters.")
|
||||||
"Error: nmux_bufsize or nmux_bufcnt is zero. "
|
|
||||||
"These depend on nmux_memory and samp_rate options in config_webrx.py"
|
|
||||||
)
|
|
||||||
|
|
||||||
return [
|
return [
|
||||||
"nmux --bufsize %d --bufcnt %d --port %d --address 127.0.0.1"
|
"nmux --bufsize %d --bufcnt %d --port %d --address 127.0.0.1"
|
||||||
|
Loading…
Reference in New Issue
Block a user