File tree 1 file changed +6
-6
lines changed
1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 2228
2228
* @param {Howl } self
2229
2229
*/
2230
2230
var decodeAudioData = function ( arraybuffer , self ) {
2231
+ // Fire a load error if something broke.
2232
+ var error = function ( ) {
2233
+ self . _emit ( 'loaderror' , null , 'Decoding audio data failed.' ) ;
2234
+ } ;
2235
+
2231
2236
// Load the sound on success.
2232
2237
var success = function ( buffer ) {
2233
2238
if ( buffer && self . _sounds . length > 0 ) {
2234
2239
cache [ self . _src ] = buffer ;
2235
2240
loadSound ( self , buffer ) ;
2236
2241
} else {
2237
- onError ( ) ;
2242
+ error ( ) ;
2238
2243
}
2239
2244
} ;
2240
2245
2241
- // Fire a load error if something broke.
2242
- var error = function ( ) {
2243
- self . _emit ( 'loaderror' , null , 'Decoding audio data failed.' ) ;
2244
- } ;
2245
-
2246
2246
// Decode the buffer into an audio source.
2247
2247
if ( typeof Promise !== 'undefined' && Howler . ctx . decodeAudioData . length === 1 ) {
2248
2248
Howler . ctx . decodeAudioData ( arraybuffer ) . then ( success ) . catch ( error ) ;
You can’t perform that action at this time.
0 commit comments