minor tidyup to sound.py
This commit is contained in:
parent
7900f68051
commit
d9c240afa2
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user