|
17 | 17 | from auto_editor.utils.cmdkw import ParserError, parse_with_palet, pAttr, pAttrs
|
18 | 18 | from auto_editor.utils.log import Log
|
19 | 19 | from auto_editor.utils.types import Args
|
20 |
| -from auto_editor.wavfile import AudioData, WavError, read, write |
| 20 | +from auto_editor.wavfile import AudioData, read, write |
21 | 21 |
|
22 | 22 | # only newer versions of ffmpeg support lra to 50.
|
23 | 23 | # Ubuntu Latest and my static ffmpeg build for Windows are the main blockers
|
@@ -182,10 +182,10 @@ def make_new_audio(
|
182 | 182 | if not tl.a or not tl.a[0]:
|
183 | 183 | log.error("Trying to render empty audio timeline")
|
184 | 184 |
|
185 |
| - for l, layer in enumerate(tl.a): |
| 185 | + for i, layer in enumerate(tl.a): |
186 | 186 | bar.start(len(layer), "Creating new audio")
|
187 | 187 |
|
188 |
| - path = Path(temp, f"new{l}.wav") |
| 188 | + path = Path(temp, f"new{i}.wav") |
189 | 189 | output.append(f"{path}")
|
190 | 190 | arr: AudioData | None = None
|
191 | 191 |
|
@@ -255,10 +255,7 @@ def make_new_audio(
|
255 | 255 | write(fid, sr, samp_list[samp_start:samp_end])
|
256 | 256 |
|
257 | 257 | ffmpeg.run(["-i", f"{af}", "-af", ",".join(filters), f"{af_out}"])
|
258 |
| - try: |
259 |
| - clip_arr = read(f"{af_out}")[1] |
260 |
| - except WavError as e: |
261 |
| - raise e |
| 258 | + clip_arr = read(f"{af_out}")[1] |
262 | 259 |
|
263 | 260 | # Mix numpy arrays
|
264 | 261 | start = clip.start * sr // tb
|
|
0 commit comments