WIP added msnu bgm again
This commit is contained in:
@@ -822,7 +822,7 @@ bool dd::Systems::PhysicsSystem::OnContact(const dd::Events::Contact &event)
|
|||||||
}
|
}
|
||||||
Events::PlaySound se;
|
Events::PlaySound se;
|
||||||
|
|
||||||
//Spawn a particle when a brick collides with somthing
|
//Spawn a particle when a brick collides with something
|
||||||
Events::CreateParticleSequence e;
|
Events::CreateParticleSequence e;
|
||||||
e.EmitterLifeTime = 3;
|
e.EmitterLifeTime = 3;
|
||||||
e.EmittingAngle = glm::half_pi<float>();
|
e.EmittingAngle = glm::half_pi<float>();
|
||||||
|
|||||||
@@ -6,12 +6,12 @@ dd::Systems::SoundSystem::~SoundSystem()
|
|||||||
for (auto &bgm : m_BGMSourcesToBuffers) {
|
for (auto &bgm : m_BGMSourcesToBuffers) {
|
||||||
alSourceStop(bgm.first);
|
alSourceStop(bgm.first);
|
||||||
alDeleteSources(1, &bgm.first);
|
alDeleteSources(1, &bgm.first);
|
||||||
bgm.second->~Sound();
|
//bgm.second->~Sound();
|
||||||
}
|
}
|
||||||
for (auto &sfx : m_SFXSourcesToBuffers) {
|
for (auto &sfx : m_SFXSourcesToBuffers) {
|
||||||
alSourceStop(sfx.first);
|
alSourceStop(sfx.first);
|
||||||
alDeleteSources(1, &sfx.first);
|
alDeleteSources(1, &sfx.first);
|
||||||
sfx.second->~Sound();
|
//sfx.second->~Sound();
|
||||||
}
|
}
|
||||||
m_BGMSourcesToBuffers.clear();
|
m_BGMSourcesToBuffers.clear();
|
||||||
m_SFXSourcesToBuffers.clear();
|
m_SFXSourcesToBuffers.clear();
|
||||||
@@ -46,11 +46,11 @@ void dd::Systems::SoundSystem::Initialize()
|
|||||||
m_BGMMasterVolume = ResourceManager::Load<ConfigFile>("Config.ini")->GetValue<float>("Audio.BGMVolume", 1.f);
|
m_BGMMasterVolume = ResourceManager::Load<ConfigFile>("Config.ini")->GetValue<float>("Audio.BGMVolume", 1.f);
|
||||||
|
|
||||||
//TODO: Move this
|
//TODO: Move this
|
||||||
// Events::PlaySound e;
|
Events::PlaySound e;
|
||||||
// e.FilePath = MENU_BGM;
|
e.FilePath = MENU_BGM;
|
||||||
// e.IsAmbient = true;
|
e.IsAmbient = true;
|
||||||
// e.Gain = 0.2f;
|
e.Gain = 0.2f;
|
||||||
// EventBroker->Publish(e);
|
EventBroker->Publish(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
void dd::Systems::SoundSystem::Update(double dt)
|
void dd::Systems::SoundSystem::Update(double dt)
|
||||||
|
|||||||
Reference in New Issue
Block a user