# V2 Audio Cooking

`V2/ue/Tools/plan-v2-audio-cooking.py` expands
`V2/ue/Build/Cooking/v2-audio-cooking.json` into deterministic Unreal commandlet
commands for every audio set and platform profile.

Source coverage is WAV and FLAC. Every profile uses `Opus` for `.opuspak`
streaming chunks, with seek tables and sample-accurate chunk alignment. PC,
Switch2, and Mobile package as `Opus`, while PS5 uses `ATRAC9` and Xbox profiles
use `XMA2` for platform package codec selection.

The plan covers streamed music, streamed dialogue, resident combat SFX, and
streamed ambience. Every command records bitrate, sample rate, channel layout,
loudness target, streaming chunk duration, output package, deterministic cache
key, and a dependency sidecar ending in `*.v2deps.json`.

Required gates:

- `audio-cooking-plan-generated`
- `audio-cooking-opus-streaming-profiles`
- `audio-cooking-platform-codec-profiles`
- `audio-cooking-streaming-chunks`
- `audio-cooking-dependency-sidecars`

The primary metrics are `cook.audio.opus_streaming_profile_count`,
`cook.audio.platform_codec_profile_count`, `cook.audio.streaming_chunk_count`,
and `cook.audio.dependency_sidecar_count`. The CI validator is:

```bash
python3 V2/ue/Tools/check-v2-audio-cooking.py
```
