Page 1 of 1

SDL 2 sound volume

Posted: Saturday 15th April 2023 5:35pm
by Technopeasant
Hello all,

I was curious if there was any way to control the volume of a sound being played by the sdl2-sound component and there does appear to be a setting for it (integer range of 1-128), but whenever I add a value it does not seem to play at all. Has anyone else played around with this or have any ideas? I was hoping to use it to create a truer 3D sound effect in my OpenGL engine.

This is my sample code:

Fountain.Volume(Rand(0, 128))
Fountain.Play

https://gambasfarm.org/wiki/comp/gb.sdl ... und/volume

Re: SDL 2 sound volume

Posted: Saturday 15th April 2023 5:41pm
by BruceSteers

Re: SDL 2 sound volume

Posted: Saturday 15th April 2023 7:17pm
by Technopeasant
Yeah, I am confused by what the difference is between sound and channel.

Music has been separate since the SDL 1 component.