Skip to content

Commit 9dcb554

Browse files
committed
Add alext.h to openal_playback test file and utilize its defines for
`ALC_HRTF_SOFT`
1 parent fb30026 commit 9dcb554

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/openal_playback.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include <stdlib.h>
88
#include <AL/al.h>
99
#include <AL/alc.h>
10+
#include <AL/alext.h>
1011
#include <assert.h>
1112
#include <stdint.h>
1213
#include <unistd.h>
@@ -32,7 +33,6 @@ void EMSCRIPTEN_KEEPALIVE test_finished() {
3233
ALC_DEVICE_PAUSE_SOFT alcDevicePauseSOFT;
3334
ALC_DEVICE_RESUME_SOFT alcDeviceResumeSOFT;
3435
#endif
35-
}
3636

3737
void playSource(void* arg) {
3838
ALuint source = static_cast<ALuint>(reinterpret_cast<intptr_t>(arg));
@@ -119,8 +119,9 @@ int main() {
119119
printf("Default device: %s\n", alcGetString(NULL, ALC_DEFAULT_DEVICE_SPECIFIER));
120120

121121
ALCdevice* device = alcOpenDevice(NULL);
122+
assert(alcIsExtensionPresent(device, "ALC_SOFT_HRTF") == AL_TRUE);
122123
#if defined(TEST_ANIMATED_LOOPED_PANNED_PLAYBACK)
123-
ALCint attrs[] = {0x1992 /* ALC_HRTF_SOFT */, ALC_TRUE, 0x1996 /* ALC_HRTF_ID_SOFT */, 0, 0};
124+
ALCint attrs[] = {ALC_HRTF_SOFT, ALC_TRUE, ALC_HRTF_ID_SOFT, 0, 0};
124125
ALCcontext* context = alcCreateContext(device, attrs);
125126
#else
126127
ALCcontext* context = alcCreateContext(device, NULL);

0 commit comments

Comments
 (0)