aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJames Urquhart <jamesu@gmail.com>2014-01-24 22:31:15 +0000
committerJames Urquhart <jamesu@gmail.com>2014-01-24 22:43:07 +0000
commitbacb36fcedbef972174bfd93aa8c41679010145d (patch)
tree1c35f998c056a5c400715422e112a78e9f3d3029 /src
parente339d065ce0381006b86588b9fa094d838519042 (diff)
Implement alIsBuffer
Diffstat (limited to 'src')
-rw-r--r--src/library_openal.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/library_openal.js b/src/library_openal.js
index 5d8acccc..98a35cd3 100644
--- a/src/library_openal.js
+++ b/src/library_openal.js
@@ -597,6 +597,21 @@ var LibraryOpenAL = {
}
},
+ alIsBuffer: function(bufferId) {
+ if (!AL.currentContext) {
+ return false;
+ }
+ if (bufferId > AL.currentContext.buf.length) {
+ return false;
+ }
+
+ if (!AL.currentContext.buf[bufferId]) {
+ return false;
+ } else {
+ return true;
+ }
+ },
+
alBufferData: function(buffer, format, data, size, freq) {
if (!AL.currentContext) {
#if OPENAL_DEBUG