start audio playing just before first queuing

This commit is contained in:
BADIM-PC\Vadim 2018-01-04 15:46:21 +03:00
parent 37b5e246b0
commit 4f0b6dab37
1 changed files with 2 additions and 3 deletions

View File

@ -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()