You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When setting a default volume on a SoLoud::AudioSource I'd expect it to be used (as documented) when creating an instance by calling myBus.play(mySound).
Actual behavior:
It always plays with volume 1.0f in the bus. When playing in root with soloud.play(mySound) it works as expected.
Steps to reproduce the problem:
SoLoud::Wav sfx;
sfx.load("my_sfx.wav");
sfx.setVolume(0.2f);
soloud.play(sfx); // plays at volume 0.2 (as expected)
sfxBus.play(sfx); // plays at volume 1.0// to force expected behaviour e.g.:
sfxBus.play(sfx, -1);
sfxBus.play(sfx, sfx.mVolume);
Steps to fix the problem:
The issue is probably just the parameter defaults in the soloud_bus.h header, where play, playClocked, play3d and play3dClocked default to aVolume = 1.0f.
In the soloud.h header, play, playClocked and playBackground default to aVolume = -1.0f, but interestingly play3d and play3dClocked also default to aVolume = 1.0f.
Is this intended behaviour or a bug?
SoLoud version: 20200207
The text was updated successfully, but these errors were encountered:
When setting a default volume on a
SoLoud::AudioSource
I'd expect it to be used (as documented) when creating an instance by callingmyBus.play(mySound)
.It always plays with volume
1.0f
in the bus. When playing in root withsoloud.play(mySound)
it works as expected.The issue is probably just the parameter defaults in the soloud_bus.h header, where
play
,playClocked
,play3d
andplay3dClocked
default toaVolume = 1.0f
.In the soloud.h header,
play
,playClocked
andplayBackground
default toaVolume = -1.0f
, but interestinglyplay3d
andplay3dClocked
also default toaVolume = 1.0f
.Is this intended behaviour or a bug?
SoLoud version: 20200207
The text was updated successfully, but these errors were encountered: