From 4f0b6dab37b9aafb955da1585270f4a6e94143e6 Mon Sep 17 00:00:00 2001 From: "BADIM-PC\\Vadim" Date: Thu, 4 Jan 2018 15:46:21 +0300 Subject: [PATCH] start audio playing just before first queuing --- src/studio.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/studio.c b/src/studio.c index d69da78..d8d7afc 100644 --- a/src/studio.c +++ b/src/studio.c @@ -2070,6 +2070,8 @@ static void transparentBlit(u32* out, s32 pitch) static void blitSound() { + SDL_PauseAudioDevice(studio.audio.device, 0); + if(studio.audio.cvt.needed) { SDL_memcpy(studio.audio.cvt.buf, studio.tic->samples.buffer, studio.tic->samples.size); @@ -2532,9 +2534,6 @@ static void initSound() studio.audio.cvt.len = studio.audio.spec.freq * sizeof studio.tic->samples.buffer[0] / TIC_FRAMERATE; studio.audio.cvt.buf = SDL_malloc(studio.audio.cvt.len * studio.audio.cvt.len_mult); } - - if(studio.audio.device) - SDL_PauseAudioDevice(studio.audio.device, 0); } static void initTouchGamepad()