File tree Expand file tree Collapse file tree 3 files changed +12
-16
lines changed Expand file tree Collapse file tree 3 files changed +12
-16
lines changed Original file line number Diff line number Diff line change @@ -2298,10 +2298,10 @@ var LibraryOpenAL = {
2298
2298
alcMakeContextCurrent : function ( contextId ) {
2299
2299
if ( contextId === 0 ) {
2300
2300
AL . currentCtx = null ;
2301
- return 0 ;
2301
+ } else {
2302
+ AL . currentCtx = AL . contexts [ contextId ] ;
2302
2303
}
2303
- AL . currentCtx = AL . contexts [ contextId ] ;
2304
- return 1 ;
2304
+ return 1 /* ALC_TRUE */ ;
2305
2305
} ,
2306
2306
2307
2307
alcGetContextsDevice__proxy : 'sync' ,
Original file line number Diff line number Diff line change 8
8
#include <stdio.h>
9
9
#include <stdlib.h>
10
10
#include <assert.h>
11
- #ifdef __EMSCRIPTEN__
12
- #include <emscripten.h>
13
11
#include <AL/al.h>
14
12
#include <AL/alc.h>
15
- #else
16
- #include "../system/include/AL/al.h"
17
- #include "../system/include/AL/alc.h"
18
- #endif
19
13
20
14
ALCdevice * device = NULL ;
21
15
ALCcontext * context = NULL ;
22
16
23
17
int main (int argc , char * argv []) {
18
+ ALCboolean ret ;
19
+
24
20
//
25
21
// Setup the AL context.
26
22
//
@@ -34,20 +30,20 @@ int main(int argc, char* argv[]) {
34
30
assert (alcGetError (device ) == ALC_NO_ERROR );
35
31
36
32
context = alcCreateContext (device , NULL );
37
- alcMakeContextCurrent (context );
33
+ ret = alcMakeContextCurrent (context );
34
+ assert (ret == ALC_TRUE );
38
35
39
36
// Request an invalid enum to generate an AL error
40
37
alGetFloat (0 );
41
38
assert (alGetError () == AL_INVALID_ENUM );
42
39
// Check that the error is reset after reading it.
43
40
assert (alGetError () == AL_NO_ERROR );
44
41
45
- alcMakeContextCurrent (NULL );
42
+ ret = alcMakeContextCurrent (NULL );
43
+ assert (ret == ALC_TRUE );
44
+
46
45
alcDestroyContext (context );
47
46
alcCloseDevice (device );
48
-
49
- #ifdef __EMSCRIPTEN__
50
- REPORT_RESULT (1 );
51
- #endif
47
+ return 0 ;
52
48
}
53
49
Original file line number Diff line number Diff line change @@ -2256,7 +2256,7 @@ def test_openal_error(self):
2256
2256
['--closure=1' ]
2257
2257
]:
2258
2258
print (args )
2259
- self .btest ('openal_error.c' , expected = '1 ' , args = args )
2259
+ self .btest_exit ('openal_error.c' , args = args )
2260
2260
2261
2261
def test_openal_capture_sanity (self ):
2262
2262
self .btest ('openal_capture_sanity.c' , expected = '0' )
You can’t perform that action at this time.
0 commit comments