mirror of
https://github.com/photonstorm/phaser
synced 2024-11-22 20:53:39 +00:00
Sound.position can no longer become negative, meaning calls to AudioContextNode.start with negative position offsets will no longer throw errors (thanks @Weedshaker #2351)
This commit is contained in:
parent
15d952171c
commit
08ce659447
2 changed files with 2 additions and 1 deletions
|
@ -325,6 +325,7 @@ You can read all about the philosophy behind Lazer [here](http://phaser.io/news/
|
|||
* TypeScript definitions fixes and updates (thanks @clark-stevenson)
|
||||
* Docs typo fixes (thanks)
|
||||
* Removed a console.log from the TilingSprite generator.
|
||||
* Sound.position can no longer become negative, meaning calls to AudioContextNode.start with negative position offsets will no longer throw errors (thanks @Weedshaker #2351)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
|
|
|
@ -589,7 +589,7 @@ Phaser.Sound.prototype = {
|
|||
if (volume === undefined) { volume = this._volume; }
|
||||
if (loop === undefined) { loop = this.loop; }
|
||||
|
||||
this.position = position;
|
||||
this.position = Math.max(0, position);
|
||||
this.volume = volume;
|
||||
this.loop = loop;
|
||||
this.duration = 0;
|
||||
|
|
Loading…
Reference in a new issue