#Audio stuck at 0 gain?

1 messages · Page 1 of 1 (latest)

sly tapir
#

I've been running into a problem where if I start playing a sound when the gain is set to 0, I can't increase it any more unless I stop and restart it. Any clue why it's doing that?

#

also this doesn't affect it

atomic dagger
#

tbh would not iterate through the assets like that

#

but when you change the gain how are you doing it?

sly tapir
#

I have a variable set to the sound when i play it and i reference that and do audio_sound_gain

#

i wish there were a way to loop thru all playing sounds

atomic dagger
#

thats one of those things where like, once you build a system for it its e z as heckfuck

sly tapir
#

yeah

atomic dagger
#

are you recycling the variable?

sly tapir
#

like reusing it?

atomic dagger
#

yeah

sly tapir
#

yeah

sly tapir
atomic dagger
#

usually i use an array. i push each sound into the array to be played and the gain is adjust based on howmany sounds are playing

sly tapir
#

oh like adaptive gain for everything?

atomic dagger
#

yep

sly tapir
#

testing in a new project, audio is stuck at 0

#

it doesnt like my variable

atomic dagger
#

so the first time you set gain has to be after its played

sly tapir
#

ah

#

using the asset and variable do different things

#

missed that in the docs

#

I think the asset and sound index gains are multiplied

#

🤯

#

ok

atomic dagger
#

they are not multiplied no, shouldnt be anyways

#

you basically get two options for controlling gain. you do it through the mixer tool OR do it through code

#

using code ignores all mixer tool settings

sly tapir
#

if I set mus_test gain to .5 and sound gain to 1, it plays at .5

#

I think I get it

atomic dagger
#

uh

#

that shouldnt happen lol

#

or is undocumented anyways

sly tapir
#

wack

sturdy garden
#

The final gain you hear is the product of the voice (snd) gain, asset (mus_test) gain and emitter (if applicable) gain.

#

Also technically listener gain (controlled by audio_master_gain) is a factor too