Skip to content

Commit

Permalink
Fixed setSoundVolume on Audio
Browse files Browse the repository at this point in the history
  • Loading branch information
Eemeli Kelokorpi committed Sep 5, 2014
1 parent fb554fe commit 4a9afb4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/engine/audio.js
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@ game.Audio = game.Class.extend({

for (var i = this.playingSounds.length - 1; i >= 0; i--) {
if (this.context) {
this.playingSounds[i].gainNode.gain.value = this.soundVolume;
this.audioObjects[this.playingSounds[i]].gainNode.gain.value = this.soundVolume;
}
else {
this.playingSounds[i].volume = this.soundVolume;
Expand All @@ -583,7 +583,7 @@ game.Audio = game.Class.extend({

for (var i = this.pausedSounds.length - 1; i >= 0; i--) {
if (this.context) {
this.pausedSounds[i].gainNode.gain.value = this.soundVolume;
this.audioObjects[this.pausedSounds[i]].gainNode.gain.value = this.soundVolume;
}
else {
this.pausedSounds[i].volume = this.soundVolume;
Expand Down

0 comments on commit 4a9afb4

Please sign in to comment.