Skip to content

Commit f5d120e

Browse files
ehsankripken
authored andcommitted
Implement alDeleteSources
1 parent 0f5fa43 commit f5d120e

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/library_openal.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,18 @@ var LibraryOpenAL = {
7070
}
7171
},
7272

73+
alDeleteSources: function(count, sources)
74+
{
75+
if (!AL.currentContext) {
76+
console.error("alDeleteSources called without a valid context");
77+
return;
78+
}
79+
for (var i = 0; i < count; ++i) {
80+
var sourceIdx = {{{ makeGetValue('sources', 'i', 'i32') }}} - 1;
81+
delete AL.currentContext.src[sourceIdx];
82+
}
83+
},
84+
7385
alGenSources: function(count, sources) {
7486
if (!AL.currentContext) {
7587
console.error("alGenSources called without a valid context");

0 commit comments

Comments
 (0)