mirror of
https://github.com/xssfox/freedvtnc2
synced 2026-08-14 19:31:47 -04:00
fix for whitespace in icom radio sound device names
This commit is contained in:
parent
1d542d489b
commit
864e56f4ca
1 changed files with 7 additions and 1 deletions
|
|
@ -28,7 +28,7 @@ class AudioDevices:
|
|||
input_channels = device_info['maxInputChannels'],
|
||||
output_channels = device_info['maxOutputChannels'],
|
||||
sample_rate = int(device_info['defaultSampleRate']),
|
||||
name = device_info['name'],
|
||||
name = device_info['name'].strip(),
|
||||
id = x
|
||||
))
|
||||
def __str__(self):
|
||||
|
|
@ -79,6 +79,9 @@ class InputDevice():
|
|||
self.callback = callback
|
||||
self.bit_depth = pyaudio.get_sample_size(FORMAT)
|
||||
|
||||
if type(name_or_id) == str:
|
||||
name_or_id = name_or_id.strip()
|
||||
|
||||
if name_or_id != None:
|
||||
try:
|
||||
self.device = next(
|
||||
|
|
@ -187,6 +190,9 @@ class OutputDevice():
|
|||
self.send_queue = []
|
||||
self.modem = modem
|
||||
|
||||
if type(name_or_id) == str:
|
||||
name_or_id = name_or_id.strip()
|
||||
|
||||
if name_or_id != None:
|
||||
try:
|
||||
self.device = next(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue