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
SDL 2 sound volume
- Technopeasant
- Posts: 151
- Joined: Saturday 13th July 2019 6:50pm
- Location: Stony Plain, Alberta, Canada
- Contact:
- BruceSteers
- Posts: 1884
- Joined: Thursday 23rd July 2020 5:20pm
- Location: Isle of Wight
- Contact:
Re: SDL 2 sound volume
the sdl2 audio component has a few volume properties...
http://gambaswiki.org/edit/comp/gb.sdl2 ... nel/volume
http://gambaswiki.org/edit/comp/gb.sdl2 ... sic/volume
http://gambaswiki.org/edit/comp/gb.sdl2 ... und/volume
Maybe you found a bug?
http://gambaswiki.org/edit/comp/gb.sdl2 ... nel/volume
http://gambaswiki.org/edit/comp/gb.sdl2 ... sic/volume
http://gambaswiki.org/edit/comp/gb.sdl2 ... und/volume
Maybe you found a bug?
If at first you don't succeed , try doing something differently.
BruceS
BruceS
- Technopeasant
- Posts: 151
- Joined: Saturday 13th July 2019 6:50pm
- Location: Stony Plain, Alberta, Canada
- Contact:
Re: SDL 2 sound volume
Yeah, I am confused by what the difference is between sound and channel.
Music has been separate since the SDL 1 component.
Music has been separate since the SDL 1 component.