diff options
author | James Urquhart <jamesu@gmail.com> | 2014-01-24 22:31:15 +0000 |
---|---|---|
committer | James Urquhart <jamesu@gmail.com> | 2014-01-24 22:43:07 +0000 |
commit | bacb36fcedbef972174bfd93aa8c41679010145d (patch) | |
tree | 1c35f998c056a5c400715422e112a78e9f3d3029 | |
parent | e339d065ce0381006b86588b9fa094d838519042 (diff) |
Implement alIsBuffer
-rw-r--r-- | src/library_openal.js | 15 |
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 |