Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion src/loaders/AudioLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,21 @@ class AudioLoader extends Loader {
const bufferCopy = buffer.slice( 0 );

const context = AudioContext.getContext();

const decodeUrl = url + '#decode';
scope.manager.itemStart( decodeUrl ); // prevent loading manager from completing too early, see #33378

context.decodeAudioData( bufferCopy, function ( audioBuffer ) {

onLoad( audioBuffer );
scope.manager.itemEnd( decodeUrl );

} ).catch( function ( e ) {

handleError( e );
scope.manager.itemEnd( decodeUrl );

} ).catch( handleError );
} );

} catch ( e ) {

Expand Down
3 changes: 3 additions & 0 deletions src/loaders/ImageBitmapLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ class ImageBitmapLoader extends Loader {
* Sets the given loader options. The structure of the object must match the `options` parameter of
* [createImageBitmap](https://developer.mozilla.org/en-US/docs/Web/API/Window/createImageBitmap).
*
* Note: When caching is enabled, the cache key is based on the URL only. Loading the same URL with
* different options will return the cached result of the first request.
*
* @param {Object} options - The loader options to set.
* @return {ImageBitmapLoader} A reference to this image bitmap loader.
*/
Expand Down
Loading