OpenRA.Platforms.Default.OpenAlSoundEngine.SetListenerPosition C# (CSharp) Method

SetListenerPosition() public method

public SetListenerPosition ( WPos position ) : void
position WPos
return void
        public void SetListenerPosition(WPos position)
        {
            // Move the listener out of the plane so that sounds near the middle of the screen aren't too positional
            AL10.alListener3f(AL10.AL_POSITION, position.X, position.Y, position.Z + 2133);

            var orientation = new[] { 0f, 0f, 1f, 0f, -1f, 0f };
            AL10.alListenerfv(AL10.AL_ORIENTATION, orientation);
            AL10.alListenerf(EFX.AL_METERS_PER_UNIT, .01f);
        }