Update OpenAL-soft to 1.21.1

This commit is contained in:
Miku AuahDark
2021-02-11 18:04:50 +08:00
parent 08f227997e
commit 904cc75ba8
358 changed files with 61122 additions and 60973 deletions
+10 -7
View File
@@ -26,11 +26,14 @@
* output handling.
*/
#include <stdio.h>
#include <assert.h>
#include <math.h>
#include <stdio.h>
#include <SDL.h>
#include "SDL.h"
#include "SDL_audio.h"
#include "SDL_error.h"
#include "SDL_stdinc.h"
#include "AL/al.h"
#include "AL/alc.h"
@@ -146,10 +149,10 @@ int main(int argc, char *argv[])
}
/* Define a macro to help load the function pointers. */
#define LOAD_PROC(x) ((x) = alcGetProcAddress(NULL, #x))
LOAD_PROC(alcLoopbackOpenDeviceSOFT);
LOAD_PROC(alcIsRenderFormatSupportedSOFT);
LOAD_PROC(alcRenderSamplesSOFT);
#define LOAD_PROC(T, x) ((x) = (T)alcGetProcAddress(NULL, #x))
LOAD_PROC(LPALCLOOPBACKOPENDEVICESOFT, alcLoopbackOpenDeviceSOFT);
LOAD_PROC(LPALCISRENDERFORMATSUPPORTEDSOFT, alcIsRenderFormatSupportedSOFT);
LOAD_PROC(LPALCRENDERSAMPLESSOFT, alcRenderSamplesSOFT);
#undef LOAD_PROC
if(SDL_Init(SDL_INIT_AUDIO) == -1)
@@ -246,7 +249,7 @@ int main(int argc, char *argv[])
/* Create the source to play the sound with. */
source = 0;
alGenSources(1, &source);
alSourcei(source, AL_BUFFER, buffer);
alSourcei(source, AL_BUFFER, (ALint)buffer);
assert(alGetError()==AL_NO_ERROR && "Failed to setup sound source");
/* Play the sound until it finishes. */