spx
spx copied to clipboard
Separate (background) music & sound effect
In SPX and Scratch, "sound" usually refers to two scenarios:
- Sound effects
- Background music
Separating music from sound effects offers several advantages:
- Music is typically played in the background for extended periods, often using loop, pause, and resume features.
- Sound effects are usually triggered briefly to signify game events, without looping or pausing.
By distinguishing these two sound categories, we can:
- Enable background music configuration for each scene.
- Simplify sound control APIs, such as:
- Non-blocking API only for music
- Blocking API only for sound effects
- Removing loop, pause, and resume options for sound effects
- Allow separate volume control for music and sound effects.