From 8095303e6b3e724685a549ad39d135f2384dc2ea Mon Sep 17 00:00:00 2001 From: "Mihails Balalajs (FGCU)" Date: Mon, 17 Nov 2025 13:58:36 -0500 Subject: [PATCH] Fixed audio and made the sounds a little quieter. --- src/Game.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Game.cpp b/src/Game.cpp index 22a83b6..d8b8f0b 100644 --- a/src/Game.cpp +++ b/src/Game.cpp @@ -194,9 +194,10 @@ void Game::run() { const float vulnerableDurationSeconds = 8.0f; // Duration of vulnerable mode auto window = sf::RenderWindow(sf::VideoMode(windowRes), windowName); + sf::Listener::setGlobalVolume(gameVolume); sf::Sound sound(*resources.getSound("start")); - //sound.play(); + sound.play(); sf::Sound pellet0(*resources.getSound("eat_dot_0")); sf::Sound pellet1(*resources.getSound("eat_dot_1")); @@ -484,9 +485,9 @@ void Game::run() { scoreText.setString(std::to_string(score)); if (pelletSoundCount % 2) { - //pellet1.play(); + pellet1.play(); } else { - //pellet0.play(); + pellet0.play(); } pelletSoundCount++;