changeset 1799:ed6c38cd288c

Initialize gain_mult when creating an audio source so things work okay for clients that don't explicitly set the gain
author Michael Pavone <pavone@retrodev.com>
date Sun, 24 Mar 2019 20:09:22 -0700
parents 5278b6e44fc1
children 0d942ecf38c5
files render_sdl.c
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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);