Files
Jander_Semester2/Semesterprojekt/docs/music.md

18 lines
937 B
Markdown

# Background music (GUI)
Background music plays only in the Swing GUI. It is **data-driven and external**:
- Put `.ogg` (OGG Vorbis) files in a `music/` folder next to where you run the game.
This folder is git-ignored and never bundled in the JAR.
- A room plays a track via an optional `music:` field in `rooms.yaml`, e.g.
`music: manor-theme.ogg`. Entering a room with a different track fades the old one
out and the new one in (sequential, not an overlapping cross-fade);
a room with no `music:` field fades to silence; the same track keeps playing
seamlessly across rooms.
- Volume is the **Music** setting (Off / Low / Medium / High) in the Settings menu,
persisted to `saves/settings.json`. Off disables playback.
- Missing files are ignored (silent) — the game never crashes over absent audio.
- The console version is always silent.
Decoding uses the `vorbisspi` + `jorbis` libraries via the `javax.sound` SPI.