mirror of
https://github.com/ankitects/anki.git
synced 2025-09-25 09:16:38 -04:00
don't leave a wav file lying around when recording
This commit is contained in:
parent
4dbb87e4c1
commit
6b479fc839
1 changed files with 4 additions and 1 deletions
|
@ -53,7 +53,7 @@ processingChain = []
|
||||||
recFiles = []
|
recFiles = []
|
||||||
|
|
||||||
processingChain = [
|
processingChain = [
|
||||||
["lame", "rec.wav", processingDst, "--noreplaygain", "--quiet"],
|
["lame", processingSrc, processingDst, "--noreplaygain", "--quiet"],
|
||||||
]
|
]
|
||||||
|
|
||||||
# don't show box on windows
|
# don't show box on windows
|
||||||
|
@ -277,6 +277,9 @@ class _Recorder:
|
||||||
ret = retryWait(subprocess.Popen(cmd, startupinfo=si, env=env))
|
ret = retryWait(subprocess.Popen(cmd, startupinfo=si, env=env))
|
||||||
except:
|
except:
|
||||||
ret = True
|
ret = True
|
||||||
|
finally:
|
||||||
|
if os.path.exists(processingSrc):
|
||||||
|
os.unlink(processingSrc)
|
||||||
if ret:
|
if ret:
|
||||||
raise Exception(_(
|
raise Exception(_(
|
||||||
"Error running %s") %
|
"Error running %s") %
|
||||||
|
|
Loading…
Reference in a new issue