mirror of
https://github.com/love2d/megasource.git
synced 2026-08-18 11:44:19 +02:00
Update OpenAL-soft to 1.23.1-bc7cb17.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user