Closed moates closed 3 years ago
I would expect that the audio group's initial volume is set to zero…
Tracks default to 100% volume. Groups are simply a way to collect tracks for ease of issuing actions (commands).
If you want certain tracks to start at any volume other than 100%, then you'll need to set them thus.
I may be misunderstanding if there's a difference between the "current volume" and the "volume" property of a given track.
At the beginning of the game, all tracks are manually stopped with AudioRunner.stop. Am I wrong to assume that the volume of a stopped track should be 0? And that the "current volume" of stopped tracks should also be 0?
Current volume and volume are generally the same thing.
The volume of a track is not affected by the stop action, which pauses the track and sets its time to zero.
If you want to set the volume at the same time, then you should also issue a volume action.
Ah, okay. I was clearly misunderstanding. Thank you for your help and patience!
Describe the bug. This is a highly specific bug I just ran into. It may also be that I fundamentally don't understand what's behind the scenes for AudioRunner.
I wrote a simple (hacky) background track manager that controls background track transitions using Passage tags. In JS, on each :passagerender I check for any music tags, fade out all old tracks in the audio group :bgmusicgroup, and play the new track.
On the first render of a game page with audio (in both Play and Debug modes), for a fraction of a second, all the tracks in the :bgmusicgroup play at once at a loud volume.
To Reproduce: only-bans-sugarcube-audio-bug-report.txt I'm attaching a minimum reproducible bug story. (Just change the extension from .txt to .html) In StoryInit, you'll need to change the audio sources to whatever test tracks you have access to.
Expected behavior. The AudioRunner.fadeOut docs say
I would expect that the audio group's initial volume is set to zero, and thus when fading out silent tracks there should not be a sudden increase in volume for all tracks.
Project details.
Desktop details.
Thank you! I love and appreciate Sugarcube. Shout out to you, maintainers!