File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -200,6 +200,32 @@ var LibraryOpenAL = {
200
200
}
201
201
} ,
202
202
203
+ alSourceUnqueueBuffers: function ( source , count , buffers )
204
+ {
205
+ if ( ! AL . currentContext ) {
206
+ console . error ( "alSourceUnqueueBuffers called without a valid context" ) ;
207
+ return ;
208
+ }
209
+ if ( source > AL . currentContext . src . length ) {
210
+ console . error ( "alSourceUnqueueBuffers called with an invalid source" ) ;
211
+ return ;
212
+ }
213
+ if ( count != 1 ) {
214
+ console . error ( "Queuing multiple buffers using alSourceUnqueueBuffers is not supported yet" ) ;
215
+ return ;
216
+ }
217
+ for ( var i = 0 ; i < count ; ++ i ) {
218
+ var buffer = AL . currentContext . src [ source - 1 ] . buffer ;
219
+ for ( var j = 0 ; j < AL . currentContext . buf . length ; ++ j ) {
220
+ if ( buffer == AL . currentContext . buf [ j ] . buf ) {
221
+ { { { makeSetValue ( 'buffers' , 'i' , 'j+1' , 'i32' ) } } } ;
222
+ AL . currentContext . src [ source - 1 ] . buffer = null ;
223
+ break ;
224
+ }
225
+ }
226
+ }
227
+ } ,
228
+
203
229
alGenBuffers : function ( count , buffers ) {
204
230
if ( ! AL . currentContext ) {
205
231
console . error ( "alGenBuffers called without a valid context" ) ;
You can’t perform that action at this time.
0 commit comments