diff --git a/assets/Sounds/BGM/soft-guitar.wav b/assets/Sounds/BGM/eastern-music.wav similarity index 75% rename from assets/Sounds/BGM/soft-guitar.wav rename to assets/Sounds/BGM/eastern-music.wav index a537397..84696e3 100644 Binary files a/assets/Sounds/BGM/soft-guitar.wav and b/assets/Sounds/BGM/eastern-music.wav differ diff --git a/assets/Sounds/BGM/under-the-sea-instrumental.wav b/assets/Sounds/BGM/under-the-sea-n.wav similarity index 74% rename from assets/Sounds/BGM/under-the-sea-instrumental.wav rename to assets/Sounds/BGM/under-the-sea-n.wav index e8d2983..56f1a23 100644 Binary files a/assets/Sounds/BGM/under-the-sea-instrumental.wav and b/assets/Sounds/BGM/under-the-sea-n.wav differ diff --git a/assets/Sounds/GUI/click-n.wav b/assets/Sounds/GUI/click-n.wav new file mode 100644 index 0000000..2460f0b Binary files /dev/null and b/assets/Sounds/GUI/click-n.wav differ diff --git a/assets/Sounds/GUI/click.wav b/assets/Sounds/GUI/click.wav deleted file mode 100644 index cda8f60..0000000 Binary files a/assets/Sounds/GUI/click.wav and /dev/null differ diff --git a/assets/Sounds/GUI/hover-n.wav b/assets/Sounds/GUI/hover-n.wav new file mode 100644 index 0000000..5723639 Binary files /dev/null and b/assets/Sounds/GUI/hover-n.wav differ diff --git a/assets/Sounds/GUI/hover.wav b/assets/Sounds/GUI/hover.wav deleted file mode 100644 index 8d3baef..0000000 Binary files a/assets/Sounds/GUI/hover.wav and /dev/null differ diff --git a/assets/Sounds/screwed.wav b/assets/Sounds/screwed.wav deleted file mode 100644 index 581e755..0000000 Binary files a/assets/Sounds/screwed.wav and /dev/null differ diff --git a/include/GUI/Button.h b/include/GUI/Button.h index e25f8c0..34ae768 100644 --- a/include/GUI/Button.h +++ b/include/GUI/Button.h @@ -76,7 +76,7 @@ protected: e.FrameName = m_Name; EventBroker->Publish(e); Events::PlaySound soundEvent; - soundEvent.FilePath = "Sounds/GUI/hover.wav"; + soundEvent.FilePath = "Sounds/GUI/hover-n.wav"; EventBroker->Publish(soundEvent); } else if (!isOver && m_MouseIsOver) { // Leave diff --git a/include/GUI/Slider.h b/include/GUI/Slider.h index a4987a6..874aadc 100644 --- a/include/GUI/Slider.h +++ b/include/GUI/Slider.h @@ -82,7 +82,7 @@ private: } else { Events::PlaySound e; - e.FilePath = "Sounds/GUI/click.wav"; + e.FilePath = "Sounds/GUI/click-n.wav"; EventBroker->Publish(e); } diff --git a/include/Sound/SoundSystem.h b/include/Sound/SoundSystem.h index 5349258..a369ef2 100644 --- a/include/Sound/SoundSystem.h +++ b/include/Sound/SoundSystem.h @@ -38,6 +38,10 @@ public: void Update(double dt) override; private: + const std::string MENU_BGM = "Sounds/BGM/eastern-music.wav"; + const std::string GAME_BGM = "Sounds/BGM/under-the-sea-n.wav"; + const std::string WATER_BGM = "Sounds/BGM/water-flowing.wav"; + float m_BGMMasterVolume = 1.f; float m_SFXMasterVolume = 1.f; std::map m_BGMSourcesToBuffers; diff --git a/src/game/Sound/SoundSystem.cpp b/src/game/Sound/SoundSystem.cpp index 7580b99..18643a6 100644 --- a/src/game/Sound/SoundSystem.cpp +++ b/src/game/Sound/SoundSystem.cpp @@ -43,6 +43,13 @@ void dd::Systems::SoundSystem::Initialize() m_SFXMasterVolume = ResourceManager::Load("Config.ini")->GetValue("Audio.SFXVolume", 1.f); m_BGMMasterVolume = ResourceManager::Load("Config.ini")->GetValue("Audio.BGMVolume", 1.f); + + //TODO: Move this + Events::PlaySound e; + e.FilePath = MENU_BGM; + e.IsAmbient = true; + e.Gain = 0.2f; + EventBroker->Publish(e); } void dd::Systems::SoundSystem::Update(double dt) @@ -180,15 +187,20 @@ bool dd::Systems::SoundSystem::OnContact(const dd::Events::Contact &event) bool dd::Systems::SoundSystem::OnGameStart(const dd::Events::GameStart &event) { + { + dd::Events::StopSound e; + e.FilePath = MENU_BGM; + EventBroker->Publish(e); + } { dd::Events::PlaySound e; - e.FilePath = "Sounds/BGM/under-the-sea-instrumental.wav"; + e.FilePath = GAME_BGM; e.IsAmbient = true; EventBroker->Publish(e); } { dd::Events::PlaySound e; - e.FilePath = "Sounds/BGM/water-flowing.wav"; + e.FilePath = WATER_BGM; e.Gain = 0.3f; e.IsAmbient = true; EventBroker->Publish(e);