} else
if( X_Audio_WebAudio_context.decodeAudioData ){
X_Audio_WebAudio_context.decodeAudioData( e.response,
- this.onDecodeSuccess = X_Callback_create( this, this._onDecodeSuccess ),
- this.onDecodeError = X_Callback_create( this, this._onDecodeError ) );
+ this.onDecodeSuccess = X_Closure_create( this, this._onDecodeSuccess ),
+ this.onDecodeError = X_Closure_create( this, this._onDecodeError ) );
} else {
this._onDecodeSuccess( X_Audio_WebAudio_context.createBuffer( e.response, false ) );
};
},
_onDecodeComplete : function(){
- X_Callback_correct( this.onDecodeSuccess );
+ X_Closure_correct( this.onDecodeSuccess );
delete this.onDecodeSuccess;
- X_Callback_correct( this.onDecodeError );
+ X_Closure_correct( this.onDecodeError );
delete this.onDecodeError;
},
this.playing && this.actualPause();
this.source && this._sourceDispose();
- this._onended && X_Callback_correct( this._onended );
+ this._onended && X_Closure_correct( this._onended );
this.gainNode && this.gainNode.disconnect();
},
// 破棄された X.Callback が呼ばれて、obj.proxy() でエラーになる。Firefox では、onended は使わない
if( false && this.source.onended !== undefined ){
//console.log( '> use onended' );
- this.source.onended = this._onended || ( this._onended = X_Callback_create( this, this._onEnded ) );
+ this.source.onended = this._onended || ( this._onended = X_Closure_create( this, this._onEnded ) );
} else {
this._timerID && X_Timer_remove( this._timerID );
this._timerID = X_Timer_once( end - begin, this, this._onEnded );
_onInterval : function(){
if( !this.playing ){
delete this._interval;
- return X_Callback_UN_LISTEN;
+ return X_CALLBACK_UN_LISTEN;
};
this.target[ 'dispatch' ]( X_EVENT_MEDIA_PLAYING );
},
};
if( this.autoLoop ){
- if( !( this.target[ 'dispatch' ]( X_EVENT_MEDIA_BEFORE_LOOP ) & X_Callback_PREVENT_DEFAULT ) ){
+ if( !( this.target[ 'dispatch' ]( X_EVENT_MEDIA_BEFORE_LOOP ) & X_CALLBACK_PREVENT_DEFAULT ) ){
this.looped = true;
this.target[ 'dispatch' ]( X_EVENT_MEDIA_LOOPED );
this.actualPlay();