OSDN Git Service

Version 0.6.218, Fix the bug of X.Net & X.Audio.
[pettanr/clientJs.git] / 0.6.x / js / 07_audio / 00_XAudio.js
index 4664aa0..60bc56e 100644 (file)
@@ -89,7 +89,7 @@ X[ 'Audio' ] = X_EventDispatcher[ 'inherits' ](
                                X_Type_isArray( sourceList ) ? X_Array_copy( sourceList ) : [ sourceList ],\r
                                opt_option || {} );\r
                        this[ 'listenOnce' ]( [ X_EVENT_BACKEND_READY, X_EVENT_BACKEND_NONE, X_EVENT_KILL_INSTANCE ], X_Audio_handleEvent );\r
-                       X_ViewPort[ 'listenOnce' ]( X_EVENT_UNLOAD, this, X_AudioSprite_handleEvent );\r
+                       X_ViewPort[ 'listenOnce' ]( X_EVENT_UNLOAD, this, X_Audio_handleEvent );\r
                },\r
                \r
                /**\r
@@ -231,7 +231,7 @@ function X_Audio_handleEvent( e ){
                        this[ 'listenOnce' ]( X_EVENT_READY, X_Audio_handleEvent );\r
                        break;\r
                \r
-               case X_EVENT_READY :\r
+               case X_EVENT_READY : // TODO AudioBase 側へ行かない?\r
                        pair = X_Pair_get( this );\r
                        ( pair.autoplay || pair._playReserved ) && pair.actualPlay();\r
                        delete pair._playReserved;\r
@@ -243,7 +243,7 @@ function X_Audio_handleEvent( e ){
                        break;\r
                \r
                case X_EVENT_KILL_INSTANCE :\r
-                       X_ViewPort[ 'unlisten' ]( X_EVENT_UNLOAD, this, X_AudioSprite_handleEvent );\r
+                       X_ViewPort[ 'unlisten' ]( X_EVENT_UNLOAD, this, X_Audio_handleEvent );\r
                        if( backend = X_Pair_get( this ) ){\r
                                backend[ 'kill' ]();\r
                                X_Pair_release( this, backend );\r
@@ -286,7 +286,7 @@ function X_Audio_onEndedDetection( e, xaudio, sourceList, option, source, ext, s
                        'backendID'   : i\r
                };\r
                // WebAudio\r
-               if( this.backendID === 1 ) _e[ 'needTouchForPlay' ] = X_WebAudio_need1stTouch;\r
+               if( this.backendID === 1 ) _e[ 'needTouchForPlay' ] = /* X_WebAudio_need1stTouch && */ X_WebAudio_isNoTouch;\r
                // HTMLAudio\r
                if( this.backendID === 2 ) _e[ 'needTouchForLoad' ] = X_HTMLAudio_need1stTouch;\r
 \r
@@ -313,7 +313,7 @@ var X_AudioBase = X_EventDispatcher[ 'inherits' ](
        'X.AudioBase',\r
        X_Class.ABSTRACT,\r
        {\r
-               disatcher     : null,\r
+               dispatcher    : null,\r
                \r
                startTime     : 0,    // state_startTime\r
                endTime       : -1,   // state_startTime\r