diff options
| author | David Reid <mackron@gmail.com> | 2017-11-20 21:47:07 +1000 |
|---|---|---|
| committer | David Reid <mackron@gmail.com> | 2017-11-20 21:47:07 +1000 |
| commit | 14b889be4127f5ce96ad9c74bc90cbb0dad771c2 (patch) | |
| tree | 8d4a18b7c154737cb17b54b1b3e030d68db86623 /src | |
| parent | 3238cba47c698dd7bbeba35d5b2ec81e9ce0b974 (diff) | |
| download | raylib-14b889be4127f5ce96ad9c74bc90cbb0dad771c2.tar.gz raylib-14b889be4127f5ce96ad9c74bc90cbb0dad771c2.zip | |
Update mini_al with a potential fix for HTML5.
Diffstat (limited to 'src')
| -rw-r--r-- | src/external/mini_al.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/external/mini_al.h b/src/external/mini_al.h index f1d7ffdc..df0f560e 100644 --- a/src/external/mini_al.h +++ b/src/external/mini_al.h @@ -8682,6 +8682,11 @@ mal_result mal_device_init__sdl(mal_context* pContext, mal_device_type type, mal return MAL_NO_DEVICE; } + // SDL1 does not support floating point formats. + if (desiredSpec.format == MAL_AUDIO_F32) { + desiredSpec.format = MAL_AUDIO_S16; + } + pDevice->sdl.deviceID = ((MAL_PFN_SDL_OpenAudio)pDevice->pContext->sdl.SDL_OpenAudio)(&desiredSpec, &obtainedSpec); if (pDevice->sdl.deviceID != 0) { return mal_post_error(pDevice, "Failed to open SDL device.", MAL_FAILED_TO_OPEN_BACKEND_DEVICE); |
