diff options
author | Ehsan Akhgari <ehsan.akhgari@gmail.com> | 2013-03-14 23:50:09 -0400 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-03-15 11:53:16 -0700 |
commit | f5d120e9b95f46ca2bece01fe601ab480b7a64e6 (patch) | |
tree | 3fd668c55123f0d494fbf38fad50e8eabffdd45a | |
parent | 0f5fa434cd21010ed731e544b6780e3fa53ac89a (diff) |
Implement alDeleteSources
-rw-r--r-- | src/library_openal.js | 12 |
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"); |