aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
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