Commit Graph

28 Commits

Author SHA1 Message Date
bddbf24ee8 audio_wav: fall back to decoder timing across Ogg sequence gaps 2026-11-27 19:07:42 +08:00
299e365b61 test: exercise normalized audio_wav output spellings
Cover a regular file with trailing separators and an actual output directory, using empty synthetic inputs.
2026-11-23 13:58:11 -08:00
8a8c9e9cfd audio_wav: bound the queue of pending WAV conversions (#6882)
Squash-merged after diff review of PR #6882 - audio_wav: bound the queue of pending WAV conversions
2026-11-23 09:45:58 -06:00
62d869408e Merge main into test-windows-nonascii
main's 8599cfcc starts build_hw_oracle.cmd from the work folder; keep its paths and
this branch's UTF-8 reads of the script (its /Fo folder is under %TEMP%).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 06:52:09 +03:00
ba1769d8ea Merge pull request #3521 from Leo Leahy 2026-11-22 17:02:29 -05:00
1a9653f4c9 audio_wav: cache destination WAV digests in plan_outputs 2026-11-22 18:15:19 -03:00
758acc9c8d audio_wav: do not reserve rejected WAV slots or skip past them in plan_outputs 2026-11-22 17:46:50 -03:00
51a6feece1 Merge main into test-windows-nonascii
hw_oracle's vcvars script is fixed on main by #2667 (UTF-8 + chcp 65001), so this
branch takes main's runner.py and drops its own 8.3-name version. Two of main's
new hw_oracle tests decoded that UTF-8 script as ASCII, which fails when %TEMP%
holds a non-ASCII user name; they now decode it as UTF-8.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 23:28:03 +03:00
84f374e853 tests: share the batch-file helper of the two audio tests (tests/winbatch.py)
Review suggestion on #2984: test_audio_wav and test_audio_stage_resume each
had their own copy of the 8.3-short-name helper. Both now call
winbatch.write_python_cmd, so the two can't diverge.

AI-assisted (Claude Code).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 22:24:49 +03:00
a9f7e3e9ab tests: pass the no-game Python tests on Windows with a non-ASCII profile path
Five tests that only the Linux CI runs fail on Windows:

- test_report_paths: the darwin patch kept Windows' os.path.normcase,
  which lowercases; use posixpath.normcase there too.
- test_audio_wav, test_audio_stage_resume: cmd.exe decodes the fake
  ffmpeg.cmd with the OEM code page, not UTF-8; write non-ASCII paths as
  their 8.3 short names, the file in the OEM code page.
- test_make_game_submodule, tools/spirv_metal_set0.py: text=True decodes
  UTF-8 child output with the ANSI code page and the reader thread dies;
  errors="replace".
- test_spirv_metal_set0_cli_errors: read the Python child's stderr in the
  locale encoding it writes, not UTF-8.

AI-assisted (Claude Code).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 22:01:03 +03:00
9b306d053c Merge pull request #2672 from Desamodeth 2026-11-22 13:16:58 -05:00
5d45a45c5b Report unreadable input directories during WAV discovery
AI-assisted-by: Codex Astra 6.2 High
2026-11-22 20:48:00 +03:00
5d145d4206 Merge pull request #2192 from Vonsek 2026-11-22 11:42:39 -05:00
4464f00043 fix(audio): fail when a WAV destination is occupied by a directory
Only an existing file counts as a completed conversion. Report a blocked path through the per-input failure summary while letting the other conversions finish.
2026-11-22 17:14:11 +01:00
e20f444ae0 fix(tools): identify Ogg Opus from its first-page packet
A codec name appearing in a comment packet is not a stream identifier. Read the first Ogg packet for both discovery and trimming so non-Opus files stay out of the conversion queue.
2026-11-22 17:02:14 +01:00
1dba48b7b7 audio: start ffmpeg without the caller's stdin
ffmpeg reads stdin for key commands. Every ffmpeg call in tools/audio_wav.py
(audio_digest, decode) and make_game.py (decode_xma) inherited the caller's
stdin, so a run started in the background of a terminal stopped at its first
decode ("Stopped (tty output)"), and input piped to the caller was swallowed.
tests/test_audio_wav.py's own ffmpeg fixture calls did the same: in a
`while read` loop over tests/ with ffmpeg on PATH, they ate the next file
names and four test files were silently skipped.

Give every ffmpeg call stdin=subprocess.DEVNULL, and add fake-ffmpeg tests
that check each call reads nothing from stdin: the decode run and the resume
check of audio_wav.py, and make_game.decode_xma().

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GQWmXYJ1uVSCTNfvSjPMF7
2026-11-22 10:28:47 +00:00
0d61c35765 Merge pull request #1196 from shadshuvo
# Conflicts:
#	tools/audio_wav.py
2026-11-22 03:29:35 -05:00
93144eb5ee Merge pull request #1193 from pasindunaduninduwara 2026-11-22 03:14:26 -05:00
5781898ca9 audio_wav: walk Ogg pages forward to reject same-serial chained streams 2026-11-22 13:37:58 +05:30
0bb570958e audio_wav.py: validate CLI --jobs and --out arguments in main()
audio_wav.py previously clamped --jobs below 1 silently to 1 instead of raising a command-line error, allowed main() only without arguments, and did not validate --out when pointing to an existing file before attempting to create directories.

- main(argv=None) now accepts programmatic arguments.
- --jobs < 1 is rejected with ap.error('--jobs must be at least 1').
- --out pointing to an existing file is rejected with ap.error.
- Extracted FakeFfmpegDecodeTest in tests/test_audio_wav.py so fake decode checks run without requiring ffmpeg on PATH.
- Added AudioWavCliTest covering all CLI validation error paths.
2026-11-22 14:05:30 +06:00
6aea8caeb1 audio_wav: reject nonpositive worker counts 2026-11-22 05:04:21 -03:00
80186d3578 Audio: preserve recordings across native filesystem name collisions 2026-11-21 20:15:07 -07:00
7fc9d562ca Keep every link when decoding chained Ogg Opus to WAV 2026-11-21 19:03:53 -07:00
c116ab8d0b Audio: allocate distinct WAV names through linked output directories 2026-11-21 16:18:02 -07:00
435c2bc19a Merge pull request #267 from nicolas 2026-11-21 17:38:21 -05:00
8bec4de069 Audio: isolate ffmpeg worker temporary WAVs from final outputs 2026-11-21 15:10:41 -07:00
71c3b0b368 audio_wav.py: give x.ogg and x.opus their own WAV instead of losing one
Both inputs mapped to x.wav (as did x.ogg and x.OPUS on Windows). Two jobs then decoded into the same
x.wav.part.wav at once, and with --jobs 1 the second replaced the first; either way the summary said
"3 WAV written" while one result was gone. output_names now keeps the extension for inputs that share a stem
(x.ogg.wav, x.opus.wav) and adds ~2, ~3 if a name still clashes. Unique names are unchanged, so WAVs from
earlier runs are still found and skipped.

make_game.py is not affected: it runs this tool on awc_opus.py output, which is all .ogg.

Tests: SameStemTest in tests/test_audio_wav.py, with a fake ffmpeg so it runs without ffmpeg installed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 01:05:08 +03:00
f247d8aac0 Audio: gate --wav preflight on assets; add audio_wav regression test
Only require ffmpeg when the assets stage will run, so --wav with shaders/runtime only is not blocked. Add tests/test_audio_wav.py: standard-library unittest, skipped without ffmpeg, pinning a 1 s Ogg Opus to an exact 48,000-frame 16-bit mono 48 kHz WAV and checking resume and missing-ffmpeg behaviour.
2026-11-21 16:12:07 +00:00