feat(io): OggMusicBackend + SwingIO wiring; music/ folder + docs
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
16
Semesterprojekt/docs/music.md
Normal file
16
Semesterprojekt/docs/music.md
Normal file
@@ -0,0 +1,16 @@
|
||||
# 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 cross-fades to it;
|
||||
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.
|
||||
Reference in New Issue
Block a user