Merge branch 'RepairWhoosh'
This commit is contained in:
commit
7a7ba94cbd
@ -2,18 +2,18 @@
|
|||||||
|
|
||||||
Audio::Audio() {
|
Audio::Audio() {
|
||||||
m_engine = irrklang::createIrrKlangDevice();
|
m_engine = irrklang::createIrrKlangDevice();
|
||||||
m_engine->setDopplerEffectParameters(10);
|
m_engine->setDopplerEffectParameters(1);
|
||||||
m_engine->setRolloffFactor(2);
|
m_engine->setRolloffFactor(1);
|
||||||
m_engine->setDefault3DSoundMinDistance(.1);
|
m_engine->setDefault3DSoundMinDistance(1);
|
||||||
m_engine->setDefault3DSoundMaxDistance(1000);
|
m_engine->setDefault3DSoundMaxDistance(1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
Audio::Audio(const char * music, const char* menumusic) {
|
Audio::Audio(const char * music, const char* menumusic) {
|
||||||
m_engine = irrklang::createIrrKlangDevice();
|
m_engine = irrklang::createIrrKlangDevice();
|
||||||
m_engine->setDopplerEffectParameters(1);
|
m_engine->setDopplerEffectParameters(1);
|
||||||
m_engine->setRolloffFactor(2);
|
m_engine->setRolloffFactor(1);
|
||||||
m_engine->setDefault3DSoundMinDistance(.1);
|
m_engine->setDefault3DSoundMinDistance(1);
|
||||||
m_engine->setDefault3DSoundMaxDistance(1000);
|
m_engine->setDefault3DSoundMaxDistance(100);
|
||||||
m_music = m_engine->play2D(music, true, true, true, irrklang::ESM_STREAMING);
|
m_music = m_engine->play2D(music, true, true, true, irrklang::ESM_STREAMING);
|
||||||
m_menumusic = m_engine->play2D(menumusic, true, true, true, irrklang::ESM_STREAMING);
|
m_menumusic = m_engine->play2D(menumusic, true, true, true, irrklang::ESM_STREAMING);
|
||||||
m_music->setVolume(.5);
|
m_music->setVolume(.5);
|
||||||
|
@ -1409,18 +1409,19 @@ void Engine::Render(float elapsedTime) {
|
|||||||
m_chunkmod = nullptr;
|
m_chunkmod = nullptr;
|
||||||
}
|
}
|
||||||
m_bullets[x] = nullptr;
|
m_bullets[x] = nullptr;
|
||||||
//if (m_whoosh[x])
|
if (m_whoosh[x]){
|
||||||
// m_whoosh[x]->drop();
|
m_whoosh[x]->drop();
|
||||||
//m_whoosh[x] = nullptr;
|
m_whoosh[x] = nullptr;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// else if (!m_whoosh[x]) {
|
else if (!m_whoosh[x]) {
|
||||||
// m_whoosh[x] = m_audio.Create3DAudioObj(m_whoosh[x], AUDIO_PATH "noise.wav", m_bullets[x]->getPos(), m_bullets[x]->getVel(), true, (m_bullets[x]->getPos() - m_player.GetPosition()).Length());
|
m_whoosh[x] = m_audio.Create3DAudioObj(m_whoosh[x], AUDIO_PATH "noise.wav", m_bullets[x]->getPos(), m_bullets[x]->getVel(), true, (m_bullets[x]->getPos() - m_player.GetPosition()).Length());
|
||||||
// }
|
}
|
||||||
// else {
|
else {
|
||||||
// Vector3f pos = m_bullets[x]->getPos(), vel = m_bullets[x]->getVel();
|
Vector3f pos = m_bullets[x]->getPos(), vel = m_bullets[x]->getVel();
|
||||||
// m_audio.Render3DAudioObj(m_whoosh[x], pos, vel, 5 - (m_bullets[x]->getPos() - m_player.GetPosition()).Length());
|
m_audio.Render3DAudioObj(m_whoosh[x], pos, vel, m_sfxvolume);
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user