So in the music widget
the command set snd_volmusic
say I set it to 50%.
when a new track plays the max volume will be set to be 50%, even if I set it to 100%. Not until another tracks starts will the max volume be able to be 100% so take this example.
Song is playing, it is too loud for me at that time. I set the volume level to 50. NOW the next song comes on, I like this song and I want it full volume so I set the volume to 100%. it will not go up. I can make it lower but not louder. Now if I set it to 100% and an 3rd song plays, that song will have the full volume range.
set snd_volmaster affects all volumes but can be raised or lowered with no issue. is there a nother snd_*music* I am missing here?
Music bug or doin it rong?
Moderator: Moderators
Re: Music bug or doin it rong?
How?smoth wrote:I set the volume level to 50.
Re: Music bug or doin it rong?
smoth wrote:the command set snd_volmusic
Re: Music bug or doin it rong?
k you found a bug
Re: Music bug or doin it rong?
I'm nothing and nobody and couldn't even figure out how to search the codebase but maybe snd_volmusic is supposed to be a float between 0.0 and 1.0 so when you set it to 50 or 100 it just interprets it as "max"... maybe you need to set it to 0.5 ?
edit: but based on that other post I'm probably wrong.
edit: but based on that other post I'm probably wrong.
Re: Music bug or doin it rong?
you don't have to be familiar to download gundam and play with the music widget :\
JK: so matis is calling eh?
JK: so matis is calling eh?

Re: Music bug or doin it rong?
The bug is here:
https://github.com/spring/spring/blob/m ... e.cpp#L283
you already fixed it, jk? if not, i can do it...
just asking cause i did most sound stuff recently, and you did not say whether you fixed it yet/will fix it.
https://github.com/spring/spring/blob/m ... e.cpp#L283
you already fixed it, jk? if not, i can do it...
just asking cause i did most sound stuff recently, and you did not say whether you fixed it yet/will fix it.
Re: Music bug or doin it rong?
Would be grateful when you fix it.
I workaround it in MusicChannel::SetVolume():
instead ofI send the changed scale
But I assume this bug is in all other SoundChannels, too. Also this workaround doesn't work when you set the volume to zero.
So the best fix would be to pass an additional argument to SoundSource::Play() & SoundSource::PlayStream, so the volume scaling is done in SoundSource and not in SoundChannel (-> split SoundSource volume from SoundChannel volume).
I workaround it in MusicChannel::SetVolume():
instead of
Code: Select all
current->SetVolume(newvolume);
Code: Select all
const float scaleVol = newvolume / std::min(0.0001f, volume);
current->SetVolume(scaleVol);
So the best fix would be to pass an additional argument to SoundSource::Play() & SoundSource::PlayStream, so the volume scaling is done in SoundSource and not in SoundChannel (-> split SoundSource volume from SoundChannel volume).