monogame-audio
Installation
SKILL.md
MonoGame Audio Implementation Guide
This skill guides implementation of audio systems in MonoGame. For detailed API signatures, see references/audio.md.
Choosing the Right Audio Class
| Class | Use case |
|---|---|
SoundEffect |
Short clips (SFX, UI sounds). Loaded entirely in memory. Call Play() for a fire-and-forget shot. |
SoundEffectInstance |
When you need control: loop, pause, resume, adjust volume/pitch at runtime. One instance = one concurrent voice. |
Song + MediaPlayer |
Background music. Streams from disk. Only one Song plays at a time. |
DynamicSoundEffectInstance |
Procedural audio, WAV streaming, microphone echo. You push PCM buffers manually. |
Never use Song for short SFX — it streams from disk and has latency. Never use SoundEffect.Play() when you need to stop or loop — use a SoundEffectInstance instead.
Loading Audio
Always load in LoadContent(), never in Update() or Draw():