diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 649b2fb..dd1b82b 100755
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -1,3 +1,9 @@
+Quisk Version 4.1.56 April 2020
+================================
+For Linux, if the file /usr/include/portaudio.h is absent, portaudio will not be included in Quisk.
+This change makes portaudio optional. The change was needed because portaudio breaks wine. Quisk now
+restores the correct frequency for the 60 meter band. There were some other bug fixes.
+
Quisk Version 4.1.55 April 2020
================================
The new Sdr Micron radio was missing from the Windows version of Quisk. There are reports that the item
diff --git a/PKG-INFO b/PKG-INFO
index ee92e0f..2eff9dd 100755
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: quisk
-Version: 4.1.55
+Version: 4.1.56
Summary: QUISK is a Software Defined Radio (SDR) transceiver that can control various radio hardware.
Home-page: http://james.ahlstrom.name/quisk/
Author: James C. Ahlstrom
diff --git a/__init__.py b/__init__.py
index ec2b174..171a590 100755
--- a/__init__.py
+++ b/__init__.py
@@ -1 +1 @@
-#Quisk version 4.1.55
+#Quisk version 4.1.56
diff --git a/configure.py b/configure.py
index 93dca3a..a70cc02 100755
--- a/configure.py
+++ b/configure.py
@@ -191,6 +191,7 @@ class Configuration:
else:
print ("Unknown format for", k, fmt)
except:
+ del radio_dict[k]
self.settings_changed = True
errors = errors + "Failed to set %s to %s using format %s\n" % (k, v, fmt)
#traceback.print_exc()
@@ -286,7 +287,7 @@ class Configuration:
def GetWidgets(self, app, hardware, conf, frame, gbs, vertBox): # Called fifth
if Settings[1] == "ConfigFileRadio":
return False
- path = self.GetRadioDict()["widgets_file_name"]
+ path = self.GetRadioDict().get("widgets_file_name", '')
path = self.NormPath(path)
if os.path.isfile(path):
dct = {}
@@ -1143,7 +1144,7 @@ class BaseWindow(wx.ScrolledWindow):
return ok
def EvalItem(self, value, fmt4): # Return Python integer, number, boolean, text
# return is (item_is_ok, evaluated_item)
- if fmt4 in ('text', 'rfil'): # text items are always OK
+ if fmt4 not in ('inte', 'numb', 'bool'): # only certain formats are evaluated
return True, value
jj = value.find('#')
if jj > 0:
@@ -1159,7 +1160,7 @@ class BaseWindow(wx.ScrolledWindow):
else:
v = False
else:
- return False, None
+ raise ValueError
except:
dlg = wx.MessageDialog(None,
"Can not set item with format %s to value %s" % (fmt4, value),
diff --git a/docs.html b/docs.html
index 4365627..4fe2e57 100755
--- a/docs.html
+++ b/docs.html
@@ -255,7 +255,7 @@ sudo apt-get install libfftw3-dev
sudo apt-get install libasound2-dev
-sudo apt-get install portaudio19-dev
+sudo apt-get install portaudio19-dev # Optional, if you want portaudio support
sudo apt-get install libpulse-dev
@@ -451,7 +451,7 @@ _quisk.so and _quisk.pyd.
"portaudio:(hw:0,0)" First sound card. "portaudio:(hw:1,0)" Second sound card, etc. diff --git a/perseuspkg/quisk_hardware.py b/perseuspkg/quisk_hardware.py index aaea0b8..c8a15a4 100755 --- a/perseuspkg/quisk_hardware.py +++ b/perseuspkg/quisk_hardware.py @@ -161,12 +161,13 @@ class Hardware(BaseHardware): print ("perseus hardware: VarDecimSet: index: %s" % (index)) if index == None: print ("perseus hardware: VarDecimSet: current sampling rate: %d" % self.current_rate) - new_rate = self.current_rate + new_rate = self.current_rate = self.application.vardecim_set else: new_rate = self.rates[index] print ("perseus hardware: VarDecimSet: New sampling rate: %d" % new_rate) perseus.set_sampling_rate(int(new_rate)) + self.current_rate = int(new_rate) return int(new_rate) diff --git a/quisk.egg-info/PKG-INFO b/quisk.egg-info/PKG-INFO index ee92e0f..2eff9dd 100755 --- a/quisk.egg-info/PKG-INFO +++ b/quisk.egg-info/PKG-INFO @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: quisk -Version: 4.1.55 +Version: 4.1.56 Summary: QUISK is a Software Defined Radio (SDR) transceiver that can control various radio hardware. Home-page: http://james.ahlstrom.name/quisk/ Author: James C. Ahlstrom diff --git a/quisk.py b/quisk.py index 48146e9..2eca26b 100755 --- a/quisk.py +++ b/quisk.py @@ -3717,7 +3717,7 @@ class App(wx.App): self.mode = conf.default_mode self.color_list = None self.color_index = 0 - self.vardecim_set = None + self.vardecim_set = 48000 self.w_phase = None self.zoom = 1.0 self.filter_bandwidth = 1000 # filter bandwidth @@ -3976,7 +3976,7 @@ The new code supports multiple corrections per band.""") self.OpenSound() tune, vfo = Hardware.ReturnFrequency() # Request initial frequency if tune is None or vfo is None: # Set last-used frequency - self.bandBtnGroup.SetLabel(self.lastBand, do_cmd=True) + self.bandBtnGroup.SetLabel(self.lastBand, do_cmd=True, direction=0) else: # Set requested frequency self.BandFromFreq(tune) self.ChangeDisplayFrequency(tune - vfo, vfo) diff --git a/quisk_conf_defaults.py b/quisk_conf_defaults.py index 3298d3e..5952534 100755 --- a/quisk_conf_defaults.py +++ b/quisk_conf_defaults.py @@ -1670,7 +1670,7 @@ freedv_tx_msg = '' # This is the list of FreeDV modes and their index number. The starting mode is the first listed. freedv_modes = (('Mode 1600', 0), ('Mode 700', 1), ('Mode 700B', 2), # ('Mode 2400A', 3), ('Mode 2400B', 4), ('Mode 800XA', 5), - ('Mode 700C', 6), ('Mode 700D', 7), ('Future8', 8), ('Future9', 9)) + ('Mode 700C', 6), ('Mode 700D', 7), ('Mode 2020', 8), ('Future9', 9), ('Future10', 10)) # These are the filter bandwidths for each mode. Quisk has built-in optimized filters # for these values, but you can change them if you want. diff --git a/quisk_widgets.py b/quisk_widgets.py index 6a8c937..d7fdd6d 100755 --- a/quisk_widgets.py +++ b/quisk_widgets.py @@ -1101,7 +1101,7 @@ class RadioButtonGroup: button.button.command = self.OnButton else: button.command = self.OnButton - def SetLabel(self, label, do_cmd=False): + def SetLabel(self, label, do_cmd=False, direction=None): self.button = None for b in self.buttons: if self.button is not None: @@ -1116,6 +1116,8 @@ class RadioButtonGroup: b.SetIndex(index) self.button = b b.SetValue(True) + if direction is not None: + b.direction = direction elif b.GetLabel() == label: b.SetValue(True) self.button = b diff --git a/setup.py b/setup.py index acf7e37..2f07662 100755 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ import struct # You must define the version here. A title string including # the version will be written to __init__.py and read by quisk.py. -Version = '4.1.55' +Version = '4.1.56' fp = open("__init__.py", "w") # write title string fp.write("#Quisk version %s\n" % Version) @@ -16,6 +16,7 @@ fp.close() is_64bit = struct.calcsize("P") == 8 +have_portaudio = False if sys.platform != "win32": try: import wx @@ -25,16 +26,26 @@ if sys.platform != "win32": print ("Please install the package libfftw3-dev") if not os.path.isdir("/usr/include/alsa"): print ("Please install the package libasound2-dev") - if not os.path.isfile("/usr/include/portaudio.h"): - print ("Please install the package portaudio19-dev") + if os.path.isfile("/usr/include/portaudio.h"): + have_portaudio = True if not os.path.isdir("/usr/include/pulse"): print ("please install the package libpulse-dev") +libraries = ['asound', 'pulse', 'fftw3', 'm'] +sources = ['quisk.c', 'sound.c', 'sound_alsa.c', 'sound_pulseaudio.c', + 'is_key_down.c', 'microphone.c', 'utility.c', + 'filter.c', 'extdemod.c', 'freedv.c'] +define_macros = [] +if have_portaudio: + libraries.append('portaudio') + sources.append('sound_portaudio.c') +else: + define_macros.append(("QUISK_NO_PORTAUDIO", None)) + module1 = Extension ('quisk._quisk', - libraries = ['asound', 'portaudio', 'pulse', 'fftw3', 'm'], - sources = ['quisk.c', 'sound.c', 'sound_alsa.c', 'sound_portaudio.c', 'sound_pulseaudio.c', - 'is_key_down.c', 'microphone.c', 'utility.c', - 'filter.c', 'extdemod.c', 'freedv.c'], + libraries = libraries, + sources = sources, + define_macros = define_macros, ) module2 = Extension ('quisk.sdriqpkg.sdriq', diff --git a/sound.c b/sound.c index 0c95baf..2f7fe91 100755 --- a/sound.c +++ b/sound.c @@ -433,7 +433,11 @@ int read_sound_interface( switch( dev->driver ) { case DEV_DRIVER_PORTAUDIO: +#ifdef QUISK_NO_PORTAUDIO + nSamples = 0; +#else nSamples = quisk_read_portaudio(dev, cSamples); +#endif break; case DEV_DRIVER_ALSA: nSamples = quisk_read_alsa(dev, cSamples); @@ -505,7 +509,9 @@ void play_sound_interface( switch( dev->driver ) { case DEV_DRIVER_PORTAUDIO: +#ifndef QUISK_NO_PORTAUDIO quisk_play_portaudio(dev, nSamples, cSamples, report_latency, volume); +#endif break; case DEV_DRIVER_ALSA: quisk_play_alsa(dev, nSamples, cSamples, report_latency, volume); @@ -860,7 +866,9 @@ void quisk_close_sound(void) // Called from sound thread #ifdef MS_WINDOWS int cleanup = radio_sound_socket != INVALID_SOCKET || radio_sound_mic_socket != INVALID_SOCKET; #endif +#ifndef QUISK_NO_PORTAUDIO quisk_close_sound_portaudio(); +#endif quisk_close_sound_alsa(CaptureDevices, PlaybackDevices); quisk_close_sound_pulseaudio(); if (pt_sample_stop) @@ -1168,7 +1176,9 @@ void quisk_start_sound(void) // Called from sound thread decide_drivers(PlaybackDevices); // Let the drivers see the devices and start them up if appropriate +#ifndef QUISK_NO_PORTAUDIO quisk_start_sound_portaudio(CaptureDevices, PlaybackDevices); +#endif quisk_start_sound_pulseaudio(CaptureDevices, PlaybackDevices); quisk_start_sound_alsa(CaptureDevices, PlaybackDevices);