tesselode / kira

Library for expressive game audio.
https://crates.io/crates/kira
Apache License 2.0
836 stars 42 forks source link

Feature request: `TrackHandle` method to stop all sounds currently playing on that track #57

Open TheBerkin opened 11 months ago

TheBerkin commented 11 months ago

The closest I can get to this functionality on my own is to either:

  1. manually track all sounds playing on a specific track and iterate through them to call their handle's stop() method
  2. drop the track and make a new one (requiring me to also remake all the attached effects/routes)

I feel like this is a common feature that kira would benefit from having built in. Would it be feasible to implement this?

tesselode commented 5 months ago

@TheBerkin by any chance would you also be interested in per-track polyphony controls? I'm considering making sounds live on a track, each of which has its own limit on the number of sounds that can be played simultaneously. In that case, it would be easier to implement this feature, although it's also possible currently. My concern is that I'd be restricting people's workflows too much by linking polyphony and mixing together into one feature.

TheBerkin commented 4 months ago

Absolutely. As long as there's no limit (beyond technical) to the number of tracks you can make, I think your idea is fine.