# HG changeset patch # User Michael Pavone # Date 1553483362 25200 # Node ID ed6c38cd288c2455c12bf10eba9e5189fcbdc25e # Parent 5278b6e44fc1998a6236553a814591b824c6d3aa Initialize gain_mult when creating an audio source so things work okay for clients that don't explicitly set the gain diff -r 5278b6e44fc1 -r ed6c38cd288c render_sdl.c --- a/render_sdl.c Sun Mar 24 19:59:41 2019 -0700 +++ b/render_sdl.c Sun Mar 24 20:09:22 2019 -0700 @@ -292,6 +292,7 @@ ret->read_start = 0; ret->read_end = sync_to_audio ? buffer_samples * channels : 0; ret->mask = sync_to_audio ? 0xFFFFFFFF : alloc_size-1; + ret->gain_mult = 1.0f; } if (sync_to_audio && SDL_GetAudioStatus() == SDL_AUDIO_PAUSED) { SDL_PauseAudio(0);