Skip to content

Commit

Permalink
Appimage changes
Browse files Browse the repository at this point in the history
  • Loading branch information
josh-richardson committed Jun 29, 2020
1 parent dfa5c97 commit b84bc65
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
5 changes: 2 additions & 3 deletions build/build_initial_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,16 @@
# This is intended to be executed inside an fbs-created Ubuntu VM
# run `fbs buildvm ubuntu` and `fbs runvm ubuntu`, then invoke this script

pip install -r requirements.txt
tar -xvf zlib-1.2.9.tar.gz
cd zlib-1.2.9
sudo -s
./configure; make; make install
cd /lib/x86_64-linux-gnu
ln -s -f /usr/local/lib/libz.so.1.2.9/lib libz.so.1
cd ~/cadmus
rm -rf zlib-1.2.9
cd ~/cadmus

cd ..
pip install -r requirements.txt
fbs freeze
cp src/main/python/librnnoise_ladspa.so target/cadmus
fbs installer
12 changes: 9 additions & 3 deletions src/main/python/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from PyQt5.QtGui import QIcon
from PyQt5.QtWidgets import QSystemTrayIcon, QMenu, QAction
from fbs_runtime.application_context.PyQt5 import ApplicationContext
from shutil import copyfile
import contextlib
import os
import pulsectl
Expand All @@ -26,11 +27,16 @@ def cli_command(command):


def load_modules(mic_name):
print(mic_name)
cadmus_cache_path = os.path.join(os.environ['HOME'], '.cache', 'cadmus')
if not os.path.exists(cadmus_cache_path):
os.makedirs(cadmus_cache_path)

cadmus_lib_path = os.path.join(cadmus_cache_path, "librnnoise_ladspa.so")
copyfile(os.path.abspath("librnnoise_ladspa.so"), cadmus_lib_path)

pulse.module_load('module-null-sink', 'sink_name=%s' % 'mic_denoised_out')
pulse.module_load('module-ladspa-sink',
'sink_name=mic_raw_in sink_master=mic_denoised_out label=noise_suppressor_mono plugin=%s' % os.path.abspath(
"librnnoise_ladspa.so"))
'sink_name=mic_raw_in sink_master=mic_denoised_out label=noise_suppressor_mono plugin=%s' % cadmus_lib_path)

pulse.module_load('module-loopback',
'latency_msec=1 source=%s sink=mic_raw_in channels=1' % mic_name)
Expand Down

0 comments on commit b84bc65

Please sign in to comment.