Open EmptyKeys opened 8 years ago
Working all fine here. Could you give us more details? (Platform, OS version) Btw next release will change many things on the workflow. For now I created a SimpleAudio sample and added the following lines in the SoundScript:
var emitter = Entity.Get<AudioEmitterComponent>();
emitter.AttachSound(SoundEffect);
var controller = emitter.GetSoundController(SoundEffect);
controller.Pitch = 2.0f;
controller.Volume = 1.5f;
controller.IsLooped = true;
controller.Play();
EDIT: Also make sure your Sound asset is marked as Spatialized.
I see. I created simple test - http://emptykeys.com/uploads/SoundTest.zip
3D sound is working fine. Think the issue is that if you are really far from emitter, you can still hear it from middle speaker. Think there should be some maximum distance. I can do that in my script for now tho.
IsLooping set to false is not working for me. Sound is still looping.
Cool, thanks! The IsLooping thing is indeed a bug :) thanks for the report!
IsLooping issue should be fixed btw.
Looks like there are few issues with audio. I added Audio Listener Component to Camera. I added Audio Emitter Component to entity, attached sounds. I can play sound with AudioEmitterSoundController, but I think it's totally ignoring IsLooped.
On top of that I don't hear sounds localized in 3D. Something is wrong. :)