aboutsummaryrefslogtreecommitdiff
path: root/src/library_openal.js
diff options
context:
space:
mode:
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 e9dafd66..d8197853 100644
--- a/src/library_openal.js
+++ b/src/library_openal.js
@@ -70,6 +70,18 @@ var LibraryOpenAL = {
}
},
+ alDeleteSources: function(count, sources)
+ {
+ if (!AL.currentContext) {
+ console.error("alDeleteSources called without a valid context");
+ return;
+ }
+ for (var i = 0; i < count; ++i) {
+ var sourceIdx = {{{ makeGetValue('sources', 'i', 'i32') }}} - 1;
+ delete AL.currentContext.src[sourceIdx];
+ }
+ },
+
alGenSources: function(count, sources) {
if (!AL.currentContext) {
console.error("alGenSources called without a valid context");