We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f7f5beb commit 7b90fc7Copy full SHA for 7b90fc7
1 file changed
v3/src/sound/webaudio/WebAudioSound.js
@@ -67,21 +67,26 @@ var WebAudioSound = new Class({
67
this.applyConfig();
68
this.source.start();
69
this.startTime = this.manager.context.currentTime;
70
+ this.pausedTime = 0;
71
return this;
72
},
73
pause: function () {
74
BaseSound.prototype.pause.call(this);
75
+ this.pausedTime = this.manager.context.currentTime - this.startTime;
76
77
78
resume: function () {
79
BaseSound.prototype.resume.call(this);
80
+ this.startTime = this.manager.context.currentTime - this.pausedTime;
81
82
83
84
stop: function () {
85
BaseSound.prototype.stop.call(this);
86
this.source.stop();
87
this.source = null;
88
this.startTime = 0;
89
90
91
92
update: function () {
0 commit comments