- if( obj === undefined ){\r
- return {\r
- startTime : this.startTime,\r
- endTime : this.endTime < 0 ? this.duration : this.endTime,\r
- loopStartTime : this.loopStartTime < 0 ? this.startTime : this.loopStartTime,\r
- loopEndTime : this.loopEndTime < 0 ? ( this.endTime || this.duration ) : this.loopEndTime,\r
- \r
- currentTime : this.playing ? this._rawObject.Position.Seconds * 1000 : this.seekTime,\r
- \r
- \r
- loop : this.loop,\r
- looped : this.looped,\r
- volume : this.volume,\r
- error : this.error,\r
- playing : this.playing,\r
- duration : this.duration // this._rawObject.NaturalDuration.Seconds;\r
- };\r
- };\r
- \r
- result = X_AudioWrapper_updateStates( this, obj );\r
- \r
- if( result & 2 ){ // seek\r
- this.play();\r
- } else {\r
- if( result & 1 ){\r
- end = X_AudioWrapper_getEndTime( this );\r
- halfway = end < this.duration;\r
- this._timerID && X.Timer.remove( this._timerID );\r
- \r
- if( halfway ){\r
- this._timerID = X.Timer.once( end - this._rawObject.Position.Seconds * 1000, this, this._onEnded );\r
- } else {\r
- delete this._timerID;\r
- };\r
-\r
- };\r
- if( result & 4 ){\r
- this._rawObject.Volume = this.volume;\r
+ if( result & 3 ){ // seek\r
+ this.actualPlay();\r
+ } else\r
+ if( result & 1 ){\r
+ end = X_Audio_getEndTime( this );\r
+ halfway = end < this.duration;\r
+ this._timerID && X_Timer_remove( this._timerID );\r
+ \r
+ if( halfway ){\r
+ this._timerID = X_Timer_once( end - this.getActualCurrentTime(), this, this._onEnded );\r
+ } else {\r
+ delete this._timerID;\r