Files
windroost/PRODUCTION/source/pixel_pilot/audio
wushenghua 7232a9f253 audio: synthesize mixed SFX and a seamless BGM loop locally
Replaced the eight plain-sine placeholders with locally synthesized audio.
The workspace grants standing authorization for image/TTS generation but not
for ElevenLabs SFX/ambience/music, so this uses only numpy/scipy math and stays
inside that boundary. tools/synthesize_audio.py builds nine cues with additive
and FM synthesis, ADSR envelopes and a short reverb, plus a 20s seamless
loop (warm pad + arpeggio + wind chimes) with a crossfaded wrap.

Runtime now follows the mix contract in PRODUCTION/08-audio.md: bus levels are
read from the generator manifest, four pooled players cap simultaneous SFX,
the same cue is rate-limited to three plays per second, each play gets +/-5%
pitch jitter, low power drops non-critical cues, and mute is a hard gate that
also stops BGM. BGM pauses/resumes with app focus. Destruction plays a reward
cue; victory plays both reward and fanfare.

The audio test covers stream loading, rate limiting, mute and event->cue
mapping. tools/run_p2_checks.sh still runs 16 gates; all pass. These remain
synthesized placeholders; authored/licensed audio is still required at ship.
2026-11-17 10:04:00 +08:00
..