Update OpenAL-soft to 1.23.1-bc7cb17.

This commit is contained in:
Miku AuahDark
2024-03-20 11:06:03 +08:00
parent 4a512be715
commit 73a6fc9196
294 changed files with 44342 additions and 40077 deletions
+8 -1
View File
@@ -30,6 +30,7 @@
#include <math.h>
#include <stdio.h>
#define SDL_MAIN_HANDLED
#include "SDL.h"
#include "SDL_audio.h"
#include "SDL_error.h"
@@ -117,7 +118,7 @@ static ALuint CreateSineWave(void)
alGenBuffers(1, &buffer);
alBufferData(buffer, AL_FORMAT_MONO16, data, sizeof(data), 44100);
/* Check if an error occured, and clean up if so. */
/* Check if an error occurred, and clean up if so. */
err = alGetError();
if(err != AL_NO_ERROR)
{
@@ -141,6 +142,8 @@ int main(int argc, char *argv[])
(void)argc;
(void)argv;
SDL_SetMainReady();
/* Print out error if extension is missing. */
if(!alcIsExtensionPresent(NULL, "ALC_SOFT_loopback"))
{
@@ -197,6 +200,10 @@ int main(int argc, char *argv[])
attrs[3] = ALC_UNSIGNED_SHORT_SOFT;
else if(obtained.format == AUDIO_S16SYS)
attrs[3] = ALC_SHORT_SOFT;
else if(obtained.format == AUDIO_S32SYS)
attrs[3] = ALC_INT_SOFT;
else if(obtained.format == AUDIO_F32SYS)
attrs[3] = ALC_FLOAT_SOFT;
else
{
fprintf(stderr, "Unhandled SDL format: 0x%04x\n", obtained.format);