Skip to content

Commit ffe4e49

Browse files
Setting duration and totalDuration properties in WebAudioSound constructor
1 parent 90d2e8c commit ffe4e49

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

v3/src/sound/webaudio/WebAudioSound.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ var WebAudioSound = new Class({
5252
this.muteNode.connect(this.volumeNode);
5353
this.volumeNode.connect(manager.destination);
5454
BaseSound.call(this, manager, key, config);
55+
this.duration = this.audioBuffer.duration;
56+
this.totalDuration = this.audioBuffer.duration;
5557
},
5658
play: function (marker, config) {
5759
if (!BaseSound.prototype.play.call(this, marker, config)) {

0 commit comments

Comments
 (0)