Commit 37c23c32 authored by Jürgen Herrmann's avatar Jürgen Herrmann

react to changes in ladspa-t5-plugins:

  added a "magic" number for pulseaudio parametric eq to use in mmap-filenames
  other numbers will be used in PaXoverRack...
parent f46100ce
......@@ -10,6 +10,9 @@ stylesheets, fix currently broken:
done:
=====
react to changes in ladspa-t5-plugins:
added a "magic" number for pulseaudio parametric eq to use in mmap-filenames
other numbers will be used in PaXoverRack...
bugfix:
fix caption of preset save dlg
insert/remove/apply dance:
......
......@@ -27,7 +27,6 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
self._prohibitLineEditUpdates = False
self._disablePresetsComboboxHandler = False
self._loadedPresetName = ""
self._pulseaudio_pid = ""
self._mmaps = []
self._pulseClient = None
self._pulseaudio_moduleindex = -1
......@@ -288,7 +287,6 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
master_sink = self._pulseaudioMasterSink()
if self._isInserted:
self.pushButtonInsert.setText("Insert")
self._pulseaudio_pid = ""
self._mmaps = []
os.system("pactl set-default-sink %s" % master_sink)
cmd = """pacmd "list-sink-inputs" | grep 'index: ' | sed 's/ index: /pacmd move-sink-input /g' | sed 's/$/ %s/g'""" % LADSPA_SINK_NAME
......@@ -305,7 +303,7 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
cmd += "sink_name=%s " % LADSPA_SINK_NAME
cmd += "sink_master=%s " % master_sink
cmd += "plugin=t5_3band_parameq_with_shelves label=3band_parameq_with_shelves "
cmd += "control=100,0,1,300,0,1,1000,0,1,3000,0,1,10000,0,1,0"
cmd += "control=100,0,1,300,0,1,1000,0,1,3000,0,1,10000,0,1,0,%s" % PARAMEQ_MMAP_MAGIC
os.system(cmd)
cmd = "pactl set-default-sink %s" % LADSPA_SINK_NAME
os.system(cmd)
......@@ -571,7 +569,8 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
content += "%0.2f,%0.2f,%0.2f," % (params[6], params[7], params[8])
content += "%0.2f,%0.2f,%0.2f," % (params[9], params[10], params[11])
content += "%0.2f,%0.2f,%0.2f," % (params[12], params[13], params[14])
content += "%0.2f\n" % (params[15])
content += "%0.2f," % params[15]
content += "%d\n" % PARAMEQ_MMAP_MAGIC
content += "set-default-sink %s\n" % LADSPA_SINK_NAME
content += "set-sink-volume %s 65536\n" % masterSinkName
content += "set-sink-mute %s 0\n" % masterSinkName
......@@ -723,11 +722,9 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
def _setupMmaps(self):
""" find pulseaudio pid and setup mmaps """
pid = os.popen("ps x|grep pulseaudio|grep -v grep").read().strip().split(" ")[0]
self._pulseaudio_pid = pid
""" setup mmaps """
os.chdir("/dev/shm")
for fname in glob.glob("t5_3BandParamEqWithShelves_%s_*.*" % pid):
for fname in glob.glob("t5_3BandParamEqWithShelves_%s_*.*" % PARAMEQ_MMAP_MAGIC):
f = open(fname, "a+b")
self._mmaps.append(mmap.mmap(f.fileno(), 0))
......
......@@ -3,7 +3,7 @@ import os
from PAPEq_rc import darkstyle_icons
CURRENT_VERSION = "0.20"
CURRENT_VERSION = "0.21"
DIALSTEPS = 10000
......@@ -51,12 +51,13 @@ 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 drawing frequency responses
SR = 44100
MAX_FREQ = 20000.0
MIN_FREQ = 10.0
MINMAX_FREQ_RATIO_LOG2 = math.log(MAX_FREQ/MIN_FREQ, 2)
MIN_GAIN = -12.0
MAX_GAIN = 12.0
PARAMEQ_MMAP_MAGIC = 12345678
SR = 44100 # Simulated samplerate for drawing frequency responses
......@@ -1231,5 +1231,5 @@ QProgressBar {
}
QProgressBar::chunk {
background-color: <background_color>;
background-color: <selection_background_color>;
}
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