tesselode / kira

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

Feature Request: Any convenience API to control the global volume #89

Closed xmoezzz closed 1 month ago

xmoezzz commented 2 months ago

I want to know if there is a convenient API currently available to control the global volume of kira. For example, if I have a track with a volume of 0.5 and I set the global volume to 0.5, then in reality, the volume of that track should be 0.25. Without such an API, developers need to individually store volume values for each track. Thanks for your great work!

tesselode commented 2 months ago

Try setting the volume of the main track. You can use AudioManager::main_track to get a handle to the main track. Then you set its volume like you would any other track.