attenuation on sound

This commit is contained in:
Adam
2014-03-11 03:34:49 +01:00
parent 57e2e404bc
commit a7aad7679d
3 changed files with 11 additions and 12 deletions
+3 -2
View File
@@ -72,9 +72,10 @@ void GameWorld::Initialize()
model->ModelFile = "ship.obj";
auto soundEmitter = AddComponent<Components::SoundEmitter>(ent, "SoundEmitter");
soundEmitter->Gain = 1;
soundEmitter->MaxDistance = 10;
soundEmitter->MaxDistance = FLT_MAX;
soundEmitter->ReferenceDistance = 10;
soundEmitter->Loop = true;
soundEmitter->ReferenceDistance = 0.1;
soundEmitter->Pitch = 1;
GetSystem<Systems::SoundSystem>("SoundSystem")->PlaySound(soundEmitter, "Sounds/hallelujah.wav");