diff options
author | Michael Pavone <pavone@retrodev.com> | 2019-03-24 20:09:22 -0700 |
---|---|---|
committer | Michael Pavone <pavone@retrodev.com> | 2019-03-24 20:09:22 -0700 |
commit | 963c93704335b92f2713b60bf3f204de17cf5244 (patch) | |
tree | f2ddb171d4f17ac994ee3af518506d2e470db48a | |
parent | c1597a8f0a63adbf7018a05a35d0c77d7bccd0c3 (diff) |
Initialize gain_mult when creating an audio source so things work okay for clients that don't explicitly set the gain
-rwxr-xr-x | render_sdl.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/render_sdl.c b/render_sdl.c index 8b92310..f162260 100755 --- a/render_sdl.c +++ b/render_sdl.c @@ -292,6 +292,7 @@ audio_source *render_audio_source(uint64_t master_clock, uint64_t sample_divider 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); |