diff --git a/qt/aqt/sound.py b/qt/aqt/sound.py index 87662549f..d53832b72 100644 --- a/qt/aqt/sound.py +++ b/qt/aqt/sound.py @@ -200,17 +200,9 @@ class SimpleMplayerPlayer(SimpleProcessPlayer): args += ["-ao", "win32"] +# Platform hacks ########################################################################## -processingSrc = "rec.wav" -processingDst = "rec.mp3" -processingChain: List[List[str]] = [] -recFiles: List[str] = [] - -processingChain = [ - ["lame", processingSrc, processingDst, "--noreplaygain", "--quiet"], -] - # don't show box on windows si: Optional[Any] if sys.platform == "win32": @@ -227,8 +219,8 @@ else: si = None +# osx throws interrupted system call errors frequently def retryWait(proc) -> Any: - # osx throws interrupted system call errors frequently while 1: try: return proc.wait() @@ -491,6 +483,14 @@ PYAU_FORMAT = pyaudio.paInt16 PYAU_CHANNELS = 1 PYAU_INPUT_INDEX: Optional[int] = None +processingSrc = "rec.wav" +processingDst = "rec.mp3" +recFiles: List[str] = [] + +processingChain: List[List[str]] = [ + ["lame", processingSrc, processingDst, "--noreplaygain", "--quiet"], +] + class _Recorder: def postprocess(self, encode=True) -> None: