aboutsummaryrefslogtreecommitdiff
path: root/src/library_openal.js
diff options
context:
space:
mode:
authorÉloi Rivard <azmeuk@gmail.com>2013-03-29 13:07:26 +0100
committerÉloi Rivard <azmeuk@gmail.com>2013-04-05 10:25:26 +0200
commitcfdcb60c150ca586ad010e634eccc0f7336707e9 (patch)
treee8fbdb7e5f724977d71fb0031551cf012cc814f5 /src/library_openal.js
parentd79e23b630c76f628b9f183106912d1f47b14d22 (diff)
Added alcGetContextsDevice and alcGetCurrentContext functions.
Added alcMakeContextCurrent return values.
Diffstat (limited to 'src/library_openal.js')
-rw-r--r--src/library_openal.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/library_openal.js b/src/library_openal.js
index 0b6e9b2f..2f657f4f 100644
--- a/src/library_openal.js
+++ b/src/library_openal.js
@@ -13,11 +13,23 @@ var LibraryOpenAL = {
alcMakeContextCurrent: function(context) {
if (context == 0) {
AL.currentContext = null;
+ return 0;
} else {
AL.currentContext = AL.contexts[context - 1];
+ return 1;
}
},
+ alcGetContextsDevice: function(context){
+ if(context < Al.contexts.length && context >= 0)
+ return 1;
+ return 0;
+ },
+
+ alcGetCurrentContext: function(){
+ return AL.currentContext;
+ },
+
alcDestroyContext: function(context) {
// Stop playback, etc
},