Skip to content

Commit 91715f6

Browse files
committed
balancing sound effects
1 parent f86ef5e commit 91715f6

File tree

6 files changed

+5
-3
lines changed

6 files changed

+5
-3
lines changed

.vs/Pacman-Clone/v16/.suo

1 KB
Binary file not shown.

.vs/Pacman-Clone/v16/Browse.VC.db

12 KB
Binary file not shown.

Src/Audio/AudioAssets.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
#define AUDIO_RETREATING "Resources/Sound/retreating.wav"
1010

1111
#define VOLUME 50
12+
#define VOLUME_MUNCH 10
13+
#define VOLUME_SIREN 60
1214

1315
enum class Sounds {
1416
None,

Src/Entity/Pacman/Pacman.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ void Pacman::Update(const float& deltaTime)
5252

5353
//handle eating snack sound effect
5454
if (isEatingSnacks && !audio.IsPlayingAudio(Sounds::Munch))
55-
audio.PlaySound(Sounds::Munch, true, VOLUME - 15);
55+
audio.PlaySound(Sounds::Munch, true, VOLUME_MUNCH);
5656
else if (!isEatingSnacks && audio.IsPlayingAudio(Sounds::Munch))
5757
audio.StopSound(Sounds::Munch);
5858

Src/States/GameState/GameState.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ void GameState::Update(const float& deltaTime)
8686
{
8787
isFreezed = false;
8888
gameHasStarted = true;
89-
audioManager.PlaySound(Sounds::Siren, true, VOLUME);
89+
audioManager.PlaySound(Sounds::Siren, true, VOLUME_SIREN);
9090

9191
}
9292

@@ -376,7 +376,7 @@ void GameState::ScareEnemys()
376376
void GameState::StopPowerSnackSound()
377377
{
378378
audioManager.StopSound(Sounds::PowerSnack);
379-
audioManager.PlaySound(Sounds::Siren, true, VOLUME);
379+
audioManager.PlaySound(Sounds::Siren, true, VOLUME_SIREN);
380380
powerSnackActive = false;
381381
}
382382

x64/Release/Pacman-Clone.exe

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)