Commit 19b3c772 authored by Jürgen Herrmann's avatar Jürgen Herrmann

don't forget to setup mmap areas on startup

parent 4579ffd8
......@@ -31,6 +31,7 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
self._pulseaudio_moduleindex = -1
self._isInserted = False
self._checkInserted()
self._setupMmaps()
# push button bindings
self.pushButtonAbout.clicked.connect(self.onShowAboutDialog)
self.pushButtonBypass.clicked.connect(self.onBypass)
......@@ -174,7 +175,6 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
self._pulseaudio_moduleindex = -1
self._isInserted = False
else:
print("Inserting... (2do)")
self.pushButtonInsert.setText("Remove")
cmd = "pactl load-module module-ladspa-sink "
cmd += "sink_name=ladspa_output.t5_3band_parameq_with_shelves "
......@@ -261,6 +261,8 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
def _applyEq(self):
""" apply ui settings to eq """
if not self._needApply:
return
try:
if self._bypassed:
buffer = struct.pack("fffffffffffffffff",
......@@ -292,6 +294,7 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
(self.sliderGain.value() / 10.0 + MIN_GAIN))
except ValueError:
buffer = None
raise
if buffer is None:
return
for mm in self._mmaps:
......@@ -307,6 +310,7 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
if so, note module id of it
"""
self._isInserted = False
self.pushButtonInsert.setText("Insert")
self._pulseaudio_moduleindex = -1
for module in self._pulseClient.module_list():
if not module.name == 'module-ladspa-sink':
......@@ -315,6 +319,7 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
continue
self._pulseaudio_moduleindex = module.index
self._isInserted = True
self.pushButtonInsert.setText("Remove")
break
......
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