|
@@ -24,6 +24,7 @@ function Audio( listener ) {
|
|
|
this.loop = false;
|
|
|
this.startTime = 0;
|
|
|
this.offset = 0;
|
|
|
+ this.duration = undefined;
|
|
|
this.playbackRate = 1;
|
|
|
this.isPlaying = false;
|
|
|
this.hasPlaybackControl = true;
|
|
@@ -98,7 +99,7 @@ Audio.prototype = Object.assign( Object.create( Object3D.prototype ), {
|
|
|
source.loop = this.loop;
|
|
|
source.onended = this.onEnded.bind( this );
|
|
|
this.startTime = this.context.currentTime;
|
|
|
- source.start( this.startTime, this.offset );
|
|
|
+ source.start( this.startTime, this.offset, this.duration );
|
|
|
|
|
|
this.isPlaying = true;
|
|
|
|