mirror of
https://github.com/love2d/megasource.git
synced 2026-08-16 16:21:13 +02:00
Update OpenAL-soft to 1.21.1
This commit is contained in:
@@ -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. */
|
||||
|
||||
Reference in New Issue
Block a user