fix: made crtl+c work
This commit is contained in:
1 parent
7f03ba1ec4
commit
e5d7b186c8
3 files changed
+9
-37
No files matched your search
+5
-4
@@ -13,7 +13,7 @@ Run: make ast or .venv/bin/python sync_audio_test.py --config config.toml
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
import os, sys, math, argparse
|
||||
import os, sys, math, argparse, signal
|
||||
import numpy as np
|
||||
|
||||
# allow tomllib (py3.11+) with tomli fallback
|
||||
@@ -38,7 +38,7 @@ except ImportError:
|
||||
HAS_SD = False
|
||||
|
||||
from sync_audio import load_wav, correlate, device_info, lag_to_seconds
|
||||
from waveform_cache import cached_load_wav
|
||||
|
||||
|
||||
|
||||
def load_config(path: str) -> dict:
|
||||
@@ -126,9 +126,9 @@ class SyncWindow(QtWidgets.QMainWindow):
|
||||
|
||||
# load
|
||||
print(f"Loading {a_path}")
|
||||
self.a, self.sr_a = cached_load_wav(a_path, target_sr=sr)
|
||||
self.a, self.sr_a = load_wav(a_path, target_sr=sr)
|
||||
print(f"Loading {b_path}")
|
||||
self.b, self.sr_b = cached_load_wav(b_path, target_sr=sr)
|
||||
self.b, self.sr_b = load_wav(b_path, target_sr=sr)
|
||||
# keep originals for lag apply
|
||||
self.a_orig = self.a.copy()
|
||||
self.b_orig = self.b.copy()
|
||||
@@ -523,6 +523,7 @@ def main():
|
||||
print(f"ERROR: B not found {b_path}", file=sys.stderr); sys.exit(1)
|
||||
|
||||
app = QtWidgets.QApplication(sys.argv)
|
||||
signal.signal(signal.SIGINT, signal.SIG_DFL)
|
||||
# Dark theme: Fusion style + dark palette (works without kvantum)
|
||||
app.setStyle("Fusion")
|
||||
dark = QtGui.QPalette()
|
||||
|
||||
Reference in new issue
Block a user