OSDN Git Service

Version 0.6.169, add doc comment.
[pettanr/clientJs.git] / 0.6.x / js / 07_audio / 01_XWebAudio.js
index db538e4..e8fd81b 100644 (file)
@@ -53,8 +53,8 @@ if( X_Audio_WebAudio_context ){
                                                } 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 ) );
                                                };
@@ -95,9 +95,9 @@ if( X_Audio_WebAudio_context ){
                                },
                                
                                _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;
                                },
                        
@@ -174,7 +174,7 @@ if( X_Audio_WebAudio_context ){
                                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();
                        },
@@ -235,7 +235,7 @@ if( X_Audio_WebAudio_context ){
                    // 破棄された 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 );
@@ -263,7 +263,7 @@ if( X_Audio_WebAudio_context ){
                                _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 );
                                },
@@ -288,7 +288,7 @@ if( X_Audio_WebAudio_context ){
                                };
                                
                                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();