OSDN Git Service
(root)
/
pettanr
/
clientJs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Version 0.6.178, fix X.KB for IE5-, X.HTMLAudio for ChromeWV & AOSP.
[pettanr/clientJs.git]
/
0.6.x
/
js
/
07_audio
/
01_XWebAudio.js
diff --git
a/0.6.x/js/07_audio/01_XWebAudio.js
b/0.6.x/js/07_audio/01_XWebAudio.js
index
522443d
..
50cf05c
100644
(file)
--- a/
0.6.x/js/07_audio/01_XWebAudio.js
+++ b/
0.6.x/js/07_audio/01_XWebAudio.js
@@
-217,7
+217,7
@@
if( X_WebAudio_context ){
gainNode : null,
_onended : null,
gainNode : null,
_onended : null,
- 'Constructor' : function(
target, url, option ){
+ 'Constructor' : function(
disatcher, url, option ){
var i = 0,
l = X_WebAudio_BUFFER_LIST.length,
loader;
var i = 0,
l = X_WebAudio_BUFFER_LIST.length,
loader;
@@
-245,8
+245,7
@@
if( X_WebAudio_context ){
this.loader = loader = X_WebAudio_BufferLoader( this, url );
};
this.loader = loader = X_WebAudio_BufferLoader( this, url );
};
- this.target = target || this;
-
+ this.disatcher = disatcher || this;
this.setState( option );
this[ 'listenOnce' ]( X_EVENT_KILL_INSTANCE, this.onKill );
this.setState( option );
this[ 'listenOnce' ]( X_EVENT_KILL_INSTANCE, this.onKill );
@@
-280,7
+279,7
@@
if( X_WebAudio_context ){
if ( !buffer ) {
this.error = loader.errorState;
if ( !buffer ) {
this.error = loader.errorState;
- this.
target
[ 'dispatch' ]({
+ this.
disatcher
[ 'dispatch' ]({
type : X_EVENT_ERROR,
error : loader.errorState,
message : loader.errorState === 1 ?
type : X_EVENT_ERROR,
error : loader.errorState,
message : loader.errorState === 1 ?
@@
-294,7
+293,7
@@
if( X_WebAudio_context ){
this.audioBuffer = buffer;
this.duration = buffer.duration * 1000;
this.audioBuffer = buffer;
this.duration = buffer.duration * 1000;
- this.
target
[ 'asyncDispatch' ]( X_EVENT_READY );
+ this.
disatcher
[ 'asyncDispatch' ]( X_EVENT_READY );
console.log( 'WebAudio buffer ready' );
console.log( 'WebAudio buffer ready' );
@@
-305,6
+304,8
@@
if( X_WebAudio_context ){
actualPlay : function(){
var begin, end;
actualPlay : function(){
var begin, end;
+ console.log( '[WebAudio] play abuf:' + !!this.audioBuffe );
+
if( !this.audioBuffer ){
this.autoplay = true;
return;
if( !this.audioBuffer ){
this.autoplay = true;
return;
@@
-361,7
+362,7
@@
if( X_WebAudio_context ){
delete this._interval;
return X_CALLBACK_UN_LISTEN;
};
delete this._interval;
return X_CALLBACK_UN_LISTEN;
};
- this.
target
[ 'dispatch' ]( X_EVENT_MEDIA_PLAYING );
+ this.
disatcher
[ 'dispatch' ]( X_EVENT_MEDIA_PLAYING );
},
_onEnded : function(){
},
_onEnded : function(){
@@
-384,14
+385,14
@@
if( X_WebAudio_context ){
};
if( this.autoLoop ){
};
if( this.autoLoop ){
- if( !( this.
target
[ 'dispatch' ]( X_EVENT_MEDIA_BEFORE_LOOP ) & X_CALLBACK_PREVENT_DEFAULT ) ){
+ if( !( this.
disatcher
[ 'dispatch' ]( X_EVENT_MEDIA_BEFORE_LOOP ) & X_CALLBACK_PREVENT_DEFAULT ) ){
this.looped = true;
this.looped = true;
- this.
target
[ 'dispatch' ]( X_EVENT_MEDIA_LOOPED );
+ this.
disatcher
[ 'dispatch' ]( X_EVENT_MEDIA_LOOPED );
this.actualPlay();
};
} else {
this.actualPause();
this.actualPlay();
};
} else {
this.actualPause();
- this.
target
[ 'dispatch' ]( X_EVENT_MEDIA_ENDED );
+ this.
disatcher
[ 'dispatch' ]( X_EVENT_MEDIA_ENDED );
};
};
},
};
};
},