From a867d3d896a1bfba1d1fb9d932f184936535d51c Mon Sep 17 00:00:00 2001 From: Daniel van Noord Date: Sun, 13 Dec 2020 22:10:06 +0100 Subject: [PATCH 1/2] Incorporated Game volume settings --- CookieMonster.js | 3 ++- src/Disp.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CookieMonster.js b/CookieMonster.js index 119ad03..d857628 100644 --- a/CookieMonster.js +++ b/CookieMonster.js @@ -1884,7 +1884,8 @@ CM.Disp.Flash = function(mode, config) { CM.Disp.PlaySound = function(url, sndConfig, volConfig) { if (CM.Config[sndConfig] == 1) { var sound = new realAudio(url); - sound.volume = CM.Config[volConfig] / 100; + // * 2 as the standard Game volume is 50%, which is quite low + sound.volume = (CM.Config[volConfig] / 100) * Game.volume * 2; sound.play(); } } diff --git a/src/Disp.js b/src/Disp.js index 06f2399..39d7275 100644 --- a/src/Disp.js +++ b/src/Disp.js @@ -980,7 +980,8 @@ CM.Disp.Flash = function(mode, config) { CM.Disp.PlaySound = function(url, sndConfig, volConfig) { if (CM.Config[sndConfig] == 1) { var sound = new realAudio(url); - sound.volume = CM.Config[volConfig] / 100; + // * 2 as the standard Game volume is 50%, which is quite low + sound.volume = (CM.Config[volConfig] / 100) * Game.volume * 2; sound.play(); } } From b80d2b63e82dee5a4f15c789a66f4e59158c9e17 Mon Sep 17 00:00:00 2001 From: Daniel van Noord Date: Sun, 13 Dec 2020 22:12:53 +0100 Subject: [PATCH 2/2] Fixed bug with Sound of notifications --- CookieMonster.js | 3 +-- src/Disp.js | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/CookieMonster.js b/CookieMonster.js index d857628..7536892 100644 --- a/CookieMonster.js +++ b/CookieMonster.js @@ -1884,8 +1884,7 @@ CM.Disp.Flash = function(mode, config) { CM.Disp.PlaySound = function(url, sndConfig, volConfig) { if (CM.Config[sndConfig] == 1) { var sound = new realAudio(url); - // * 2 as the standard Game volume is 50%, which is quite low - sound.volume = (CM.Config[volConfig] / 100) * Game.volume * 2; + sound.volume = (CM.Config[volConfig] / 100) * (Game.volume / 100); sound.play(); } } diff --git a/src/Disp.js b/src/Disp.js index 39d7275..5a01efa 100644 --- a/src/Disp.js +++ b/src/Disp.js @@ -980,8 +980,7 @@ CM.Disp.Flash = function(mode, config) { CM.Disp.PlaySound = function(url, sndConfig, volConfig) { if (CM.Config[sndConfig] == 1) { var sound = new realAudio(url); - // * 2 as the standard Game volume is 50%, which is quite low - sound.volume = (CM.Config[volConfig] / 100) * Game.volume * 2; + sound.volume = (CM.Config[volConfig] / 100) * (Game.volume / 100); sound.play(); } }