Commit 0e30105d authored by Jürgen Herrmann's avatar Jürgen Herrmann

bugfixe in _modifyDefaultPa

will be released as 0.38
parent eff80418
0.36
\ No newline at end of file
0.37
\ No newline at end of file
2do:
====
on insert:
get and remember current default sink volume
set remembered volume on new input sink
set volume to 100% on old default sink
on remove:
remember current default sink volume
set remembered volume on new default sink
done:
......
......@@ -366,7 +366,7 @@ class MainWindow(QMainWindow, Ui_MainWindow):
os.system(cmd)
self._checkInserted()
if self._isInserted:
self._modifyDefaultPa(action="insert")
self._modifyDefaultPa(action="insert", masterSinkName=hw_sink)
self._setupMmaps()
self._needApply = True
else:
......@@ -583,7 +583,7 @@ class MainWindow(QMainWindow, Ui_MainWindow):
self._needApply = True
def _modifyDefaultPa(self, action=None):
def _modifyDefaultPa(self, action=None, masterSinkName=None):
""" modify ~/.config/pulse/default.pa """
dlg = QMessageBox()
try:
......@@ -607,7 +607,6 @@ class MainWindow(QMainWindow, Ui_MainWindow):
dlg.critical(self, "FATAL ERROR", "Could not write ~/.config/pulse/default.pa.backup_by_parameq !")
return
if action == "insert":
masterSinkName = self._pulseaudioMasterSink()
params = self._uiParams()
if content and content[-1] != "\n":
content += "\n"
......@@ -772,18 +771,6 @@ class MainWindow(QMainWindow, Ui_MainWindow):
sys.exit(1)
@staticmethod
def _pulseaudioMasterSink():
""" return name of pulseaudio master sink """
ret = os.popen('pacmd stat|grep "Default sink name"').read().replace("\n", "").replace("Default sink name: ", "")
if ret == LADSPA_SINK_NAME:
cmd = r"""pacmd info | grep --color=never -A30 "%s" | grep --color=never -m1 'device.master_device = ' | sed 's/device.master_device = //g' | sed 's/"//g' | sed 's/^[ \t]*//'""" % ret
masterdev = os.popen(cmd).read().replace("\n", "")
else:
masterdev = ret
return masterdev
def _readIniSettings(self):
""" read ini settings """
s = self._settings
......
Package: pulseaudio-parametric-eq
Version: 0.36
Version: 0.37
Section: audio
Priority: optional
Architecture: all
......
import math
import os
CURRENT_VERSION = "0.37"
CURRENT_VERSION = "0.38"
DIALSTEPS = 10000
......
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