From 8d4575741d3f83fc122bf33359160d6dc2d57112 Mon Sep 17 00:00:00 2001 From: David Reid Date: Sun, 29 Oct 2017 18:17:34 +1000 Subject: [PATCH] Bug fix. --- mini_al.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/mini_al.h b/mini_al.h index ec169b86..eedaf69a 100644 --- a/mini_al.h +++ b/mini_al.h @@ -7761,6 +7761,7 @@ mal_result mal_context_init(mal_backend backends[], mal_uint32 backendCount, mal mal_backend_wasapi, mal_backend_dsound, mal_backend_winmm, + mal_backend_alsa, mal_backend_oss, mal_backend_opensl, @@ -8049,10 +8050,8 @@ mal_result mal_device_init(mal_context* pContext, mal_device_type type, mal_devi config.bufferSizeInFrames = (config.sampleRate/1000) * MAL_DEFAULT_BUFFER_SIZE_IN_MILLISECONDS; pDevice->usingDefaultBufferSize = MAL_TRUE; } - - mal_uint32 periods = config.periods; - if (periods == 0) { - periods = MAL_DEFAULT_PERIODS; + if (config.periods == 0) { + config.periods = MAL_DEFAULT_PERIODS; pDevice->usingDefaultPeriods = MAL_TRUE; }