mirror of
https://github.com/love2d/megasource.git
synced 2026-08-17 03:02:49 +02:00
Updated OpenAL Soft to 1.17.2.
This commit is contained in:
@@ -686,7 +686,7 @@ static int audio_thread(void *userdata)
|
||||
movState->audio.st->codec->sample_rate,
|
||||
movState->audio.st->codec->channel_layout ?
|
||||
movState->audio.st->codec->channel_layout :
|
||||
av_get_default_channel_layout(movState->audio.st->codec->channels),
|
||||
(uint64_t)av_get_default_channel_layout(movState->audio.st->codec->channels),
|
||||
movState->audio.st->codec->sample_fmt,
|
||||
movState->audio.st->codec->sample_rate,
|
||||
0, NULL
|
||||
|
||||
@@ -227,7 +227,7 @@ int main(int argc, char **argv)
|
||||
angle = 0.0;
|
||||
alSourcePlay(source);
|
||||
do {
|
||||
Sleep(10);
|
||||
al_nssleep(10000000);
|
||||
|
||||
/* Rotate the source around the listener by about 1/4 cycle per second.
|
||||
* Only affects mono sounds.
|
||||
|
||||
@@ -182,7 +182,7 @@ int main(int argc, char **argv)
|
||||
/* Play the sound until it finishes. */
|
||||
alSourcePlay(source);
|
||||
do {
|
||||
Sleep(10);
|
||||
al_nssleep(10000000);
|
||||
alGetSourcei(source, AL_SOURCE_STATE, &state);
|
||||
|
||||
/* Get the source offset and latency. AL_SEC_OFFSET_LATENCY_SOFT will
|
||||
|
||||
@@ -216,7 +216,7 @@ int main(int argc, char *argv[])
|
||||
/* Play the sound until it finishes. */
|
||||
alSourcePlay(source);
|
||||
do {
|
||||
Sleep(10);
|
||||
al_nssleep(10000000);
|
||||
alGetSourcei(source, AL_SOURCE_STATE, &state);
|
||||
} while(alGetError() == AL_NO_ERROR && state == AL_PLAYING);
|
||||
|
||||
|
||||
@@ -311,7 +311,7 @@ int main(int argc, char **argv)
|
||||
/* Play the sound until it finishes. */
|
||||
alSourcePlay(source);
|
||||
do {
|
||||
Sleep(10);
|
||||
al_nssleep(10000000);
|
||||
alGetSourcei(source, AL_SOURCE_STATE, &state);
|
||||
} while(alGetError() == AL_NO_ERROR && state == AL_PLAYING);
|
||||
|
||||
|
||||
@@ -318,7 +318,7 @@ int main(int argc, char **argv)
|
||||
}
|
||||
|
||||
while(UpdatePlayer(player))
|
||||
Sleep(10);
|
||||
al_nssleep(10000000);
|
||||
|
||||
/* All done with this file. Close it and go to the next */
|
||||
ClosePlayerFile(player);
|
||||
|
||||
@@ -246,7 +246,7 @@ int main(int argc, char *argv[])
|
||||
alSourcePlay(source);
|
||||
do {
|
||||
ALint pos;
|
||||
Sleep(10);
|
||||
al_nssleep(10000000);
|
||||
alGetSourcei(source, AL_SAMPLE_OFFSET, &pos);
|
||||
alGetSourcei(source, AL_SOURCE_STATE, &state);
|
||||
if(pos < last_pos && state == AL_PLAYING)
|
||||
|
||||
@@ -1,18 +1,12 @@
|
||||
#ifndef ALHELPERS_H
|
||||
#define ALHELPERS_H
|
||||
|
||||
#ifndef _WIN32
|
||||
#include <unistd.h>
|
||||
#define Sleep(x) usleep((x)*1000)
|
||||
#else
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
#include "AL/alc.h"
|
||||
#include "AL/al.h"
|
||||
#include "AL/alext.h"
|
||||
|
||||
#include "threads.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
Reference in New Issue
Block a user