Audio from PlayerCar is distorted or slightly garbled. Using PUN

MogaMoga
edited August 13 in Any Topic & Chat
I have re-used my single-playerCar and its audioController for Photon PUN. The audioController gets its input from the carController which has a photonView watching the transform and rigidbidy. There is also an OnSerializedView method that reads or write the player inputs for the non local players. It all is working cleanly except the audio.

Whether I join a game as single player or host more then myself the car audio begins to sound as if it were 'under water' or distorted when approaching higher speeds. Not sure why this is happening as the audioController receives the same message from the carController whether networked or not. Here is the SerializeView on the carController... the audioController simple reads the speed and throttle from the car.
        public void OnPhotonSerializeView(PhotonStream stream, PhotonMessageInfo info)
        {
            if (stream.IsWriting)
            {
                stream.SendNext(SteeringInput);
                stream.SendNext(AccelerationInput);
                stream.SendNext(BrakeInput);
                stream.SendNext(HandbrakeInput);
            }
            else
            {
                this.SteeringInput = (float)stream.ReceiveNext();
                this.AccelerationInput = (float)stream.ReceiveNext();
                this.BrakeInput = (float)stream.ReceiveNext();
                this.HandbrakeInput = (float)stream.ReceiveNext();
            }
        }
Sign In or Register to comment.