Commit 9da9b8ee authored by Jürgen Herrmann's avatar Jürgen Herrmann

bugfixes

parent 4f3b4ae1
0.13
\ No newline at end of file
0.16
\ No newline at end of file
......@@ -538,9 +538,14 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
content = f.read()
f.close()
except (OSError, IOError, FileNotFoundError):
dlg = QtGui.QMessageBox()
dlg.critical("FATAL ERROR", "Could not read ~/.config/pulse/default.pa !")
return
os.system("mkdir -p ~/.config/pulse")
try:
f = open(os.path.expanduser("/etc/pulse/default.pa"), "r")
content = f.read()
f.close()
except (OSError, IOError, FileNotFoundError):
dlg.critical("FATAL ERROR", "Could not read /etc/pulse/default.pa !")
return
try:
f = open(os.path.expanduser("~/.config/pulse/default.pa.backup_by_parameq"), "w")
f.write(content)
......@@ -552,9 +557,9 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
if action == "insert":
masterSinkName = self._pulseaudioMasterSink()
params = self._uiParams()
if content[-1] != "\n":
if content and content[-1] != "\n":
content += "\n"
if content[-2:] != "\n\n":
if content and content[-2:] != "\n\n":
content += "\n"
content += "### BEGIN: Parametric equalizer configuration\n"
content += "### Generated from: pulseaudio-parameq\n"
......@@ -572,7 +577,7 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
content += "set-sink-volume %s 65536\n" % masterSinkName
content += "set-sink-mute %s 0\n" % masterSinkName
content += "### END: Parametric equalizer configuration\n"
if action == "remove":
elif action == "remove":
pattern = "### BEGIN: Parametric equalizer configuration\n"
pattern += ".*### END: Parametric equalizer configuration\n"
content = re.sub(pattern, "", content, flags=re.DOTALL)
......
......@@ -3,7 +3,7 @@ Version: _VERSION_
Section: audio
Priority: optional
Architecture: all
Depends: ladspa-t5-plugins, python3
Depends: ladspa-t5-plugins, python3, python3-pyqt4, python3-matplotlib, python3-scipy
Maintainer: Jürgen Herrmann (t-5@t-5.eu)
Description: Pulseaudio Parametric Equalizer
A python/qt GUI for managing a fully parametric 3-and equalizer with shelves.
A python/qt GUI for managing a fully parametric 3-and equalizer with shelves and insert it into pulseaudio.
import math
CURRENT_VERSION = "0.13"
CURRENT_VERSION = "0.16"
DIALSTEPS = 10000
......@@ -59,7 +59,7 @@ LADSPA_SINK_NAME = "ladspa_output.t5_3band_parameq_with_shelves"
LADSPA_LABEL = "3band_parameq_with_shelves"
LADSPA_LIBRARY = "t5_3band_parameq_with_shelves"
# Simulated samplerate for drawinf frequency responses
# Simulated samplerate for drawing frequency responses
SR = 44100
MAX_FREQ = 20000.0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment