minor tidyup to sound.py
This commit is contained in:
parent
7900f68051
commit
d9c240afa2
@ -200,17 +200,9 @@ class SimpleMplayerPlayer(SimpleProcessPlayer):
|
|||||||
args += ["-ao", "win32"]
|
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
|
# don't show box on windows
|
||||||
si: Optional[Any]
|
si: Optional[Any]
|
||||||
if sys.platform == "win32":
|
if sys.platform == "win32":
|
||||||
@ -227,8 +219,8 @@ else:
|
|||||||
si = None
|
si = None
|
||||||
|
|
||||||
|
|
||||||
def retryWait(proc) -> Any:
|
|
||||||
# osx throws interrupted system call errors frequently
|
# osx throws interrupted system call errors frequently
|
||||||
|
def retryWait(proc) -> Any:
|
||||||
while 1:
|
while 1:
|
||||||
try:
|
try:
|
||||||
return proc.wait()
|
return proc.wait()
|
||||||
@ -491,6 +483,14 @@ PYAU_FORMAT = pyaudio.paInt16
|
|||||||
PYAU_CHANNELS = 1
|
PYAU_CHANNELS = 1
|
||||||
PYAU_INPUT_INDEX: Optional[int] = None
|
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:
|
class _Recorder:
|
||||||
def postprocess(self, encode=True) -> None:
|
def postprocess(self, encode=True) -> None:
|
||||||
|
Loading…
Reference in New Issue
Block a user