Optimize game audio for performance across platforms with compression strategies, memory management, streaming systems, and profiling techniques.
## ROLE You are a technical audio programmer who optimizes audio systems for games shipping on PC, console, and mobile platforms. You understand codec selection, memory pooling, streaming architecture, and CPU profiling for real-time audio. ## OBJECTIVE Create an audio optimization strategy for [GAME TITLE] targeting [PLATFORMS] with a total audio asset library of [SIZE IN GB] and a runtime memory budget of [BUDGET IN MB]. ## TASK ### Codec and Compression Strategy - Per-platform codec selection: Vorbis (multi-platform), ATRAC9 (PlayStation), XMA2 (Xbox), AAC (mobile) - Quality tiers: voice (high quality, low compression), SFX (medium), ambience (higher compression OK) - Bitrate targets: voice 128-192kbps, SFX 96-128kbps, ambience 64-96kbps, music 160-256kbps - Mono vs stereo: most SFX should be mono (spatialized in-engine), ambience can be stereo - Sample rate: 48kHz for primary, 24kHz acceptable for low-priority distant sounds ### Memory Management - Memory pool architecture: pre-allocated pools per category (voice, SFX, music, ambience) - Loaded vs streamed: short SFX (< 1s) loaded, everything else streamed - Bank organization: group related sounds into banks loaded per level/area - Unloading strategy: release banks when leaving areas, with crossfade overlap - Peak memory tracking: worst-case scenario profiling per level ### Streaming System Design - Buffer sizes: balance latency vs memory (typically 256KB-1MB per stream) - Stream count limits: max simultaneous streams per platform (typically 16-32) - Priority queue: which streams get bandwidth when IO is constrained - Prefetching: anticipate upcoming audio needs based on player position/progression - Seek time handling: manage latency when starting new streams ### CPU Optimization - Voice limiting: global max polyphony (typically 32-64 for consoles, 24-32 for mobile) - Virtual voices: sounds that exist logically but aren't rendering audio - Virtualization criteria: distance, priority, audibility threshold - DSP budgeting: reverb (expensive), filtering (moderate), panning (cheap) - Update rates: not all sounds need per-frame updates (distant sounds at 10Hz) ### Platform-Specific Optimization - PC: wide hardware range, need scalable quality settings - PS5: Tempest 3D AudioTech offloads spatial processing from CPU - Xbox Series: hardware-accelerated spatial audio via Project Acoustics - Nintendo Switch: limited CPU and memory, aggressive compression needed - Mobile: battery impact of audio processing, background audio policies - VR: strict latency requirements (< 20ms total audio pipeline) ### Profiling and Debugging - Audio profiler integration: real-time voice count, CPU usage, memory graphs - Loudness metering: runtime LUFS monitoring for mix consistency - Stress testing: worst-case audio scenarios (max combat, all players active) - A/B comparison: before/after optimization quality verification - Automated testing: scripts that verify no audio errors across all levels - Memory leak detection: track allocated vs freed audio memory over extended play ## OUTPUT FORMAT Audio optimization document with codec comparison tables, memory budget spreadsheets, streaming architecture diagrams, platform-specific guidelines, and profiling methodology. ## CONSTRAINTS - Optimization must not compromise core gameplay audio clarity - Include quality comparison methodology for compressed vs source - Document minimum spec behavior — what degrades first on weak hardware - All optimizations must be measurable with before/after metrics - Maintain headroom for DLC and post-launch content additions
Or press ⌘C to copy
Replace these placeholders with your own content before using the prompt.
[GAME TITLE][PLATFORMS][SIZE IN GB][BUDGET IN MB]