spx icon indicating copy to clipboard operation
spx copied to clipboard

Separate (background) music & sound effect

Open nighca opened this issue 4 months ago • 0 comments

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.

nighca avatar Oct 08 '24 02:10 nighca