void Update()
        {
            if (bufferedAudioStream == null)
            {
                throw new System.Exception("VoipAudioSource failed to init");
            }

            bufferedAudioStream.Update();
        }
Ejemplo n.º 2
0
        void Update()
        {
            if (bufferedAudioStream == null)
            {
                throw new Exception("VoipAudioSource failed to init");
            }

            if (senderID == 0)
            {
                throw new Exception("SenderID not set");
            }

            int copied = (int)CAPI.ovr_Voip_GetPCMFloat(senderID, scratchBuffer, (UIntPtr)scratchBuffer.Length);

            if (copied > 0)
            {
                bufferedAudioStream.AddData(scratchBuffer, copied);
            }

            bufferedAudioStream.Update();
        }