comparison 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
comparison
equal deleted inserted replaced
1798:5278b6e44fc1 1799:ed6c38cd288c
290 ret->buffer_fraction = 0; 290 ret->buffer_fraction = 0;
291 ret->last_left = ret->last_right = 0; 291 ret->last_left = ret->last_right = 0;
292 ret->read_start = 0; 292 ret->read_start = 0;
293 ret->read_end = sync_to_audio ? buffer_samples * channels : 0; 293 ret->read_end = sync_to_audio ? buffer_samples * channels : 0;
294 ret->mask = sync_to_audio ? 0xFFFFFFFF : alloc_size-1; 294 ret->mask = sync_to_audio ? 0xFFFFFFFF : alloc_size-1;
295 ret->gain_mult = 1.0f;
295 } 296 }
296 if (sync_to_audio && SDL_GetAudioStatus() == SDL_AUDIO_PAUSED) { 297 if (sync_to_audio && SDL_GetAudioStatus() == SDL_AUDIO_PAUSED) {
297 SDL_PauseAudio(0); 298 SDL_PauseAudio(0);
298 } 299 }
299 return ret; 300 return ret;