diff render_sdl.c @ 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 5ff8f0d28188
children 34370330eaf3
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);