diff options
author | Ehsan Akhgari <ehsan.akhgari@gmail.com> | 2013-03-13 18:13:53 -0400 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-03-15 11:53:15 -0700 |
commit | ee0b6c257c690c8973164a92e58abb388431dd50 (patch) | |
tree | 43c376041b46d75e124c1b7c8ef9d417fc4030d7 /src | |
parent | 111804a6730093b8e8d154acc9df6b9b52cf79c4 (diff) |
Fix context creation and making it current
Diffstat (limited to 'src')
-rw-r--r-- | src/library_openal.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/library_openal.js b/src/library_openal.js index 5316faa5..60714091 100644 --- a/src/library_openal.js +++ b/src/library_openal.js @@ -20,7 +20,7 @@ var LibraryOpenAL = { if (context == 0) { AL.currentContext = null; } else { - AL.currentContext = AL.contexts[context]; + AL.currentContext = AL.contexts[context - 1]; } }, @@ -62,7 +62,7 @@ var LibraryOpenAL = { if (ctx) { AL.contexts.push({ctx: ctx, err: 0, src: [], buf: []}); - return AL.contexts.length - 1; + return AL.contexts.length; } else { return 0; } |