From 4f293767910f15472d5b0044e2ad163f56c5b8a6 Mon Sep 17 00:00:00 2001 From: Kyle Johnsen Date: Thu, 23 Dec 2021 09:35:48 -0500 Subject: [PATCH] fixed audio streaming --- .../Assets/DFVoice/Scripts/Components/VelVoiceController.cs | 2 +- .../Assets/DFVoice/Scripts/Components/VoiceControllerBase.cs | 2 +- TestVelGameServer/Assets/NetworkPlayer.cs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/TestVelGameServer/Assets/DFVoice/Scripts/Components/VelVoiceController.cs b/TestVelGameServer/Assets/DFVoice/Scripts/Components/VelVoiceController.cs index a9de486..9eff133 100644 --- a/TestVelGameServer/Assets/DFVoice/Scripts/Components/VelVoiceController.cs +++ b/TestVelGameServer/Assets/DFVoice/Scripts/Components/VelVoiceController.cs @@ -26,7 +26,7 @@ public class VelVoiceController : VoiceControllerBase void Start() { player = GetComponent(); - VoiceControllerCollection.RegisterVoiceController(this); + init(); } // Update is called once per frame diff --git a/TestVelGameServer/Assets/DFVoice/Scripts/Components/VoiceControllerBase.cs b/TestVelGameServer/Assets/DFVoice/Scripts/Components/VoiceControllerBase.cs index da3400b..69f7638 100644 --- a/TestVelGameServer/Assets/DFVoice/Scripts/Components/VoiceControllerBase.cs +++ b/TestVelGameServer/Assets/DFVoice/Scripts/Components/VoiceControllerBase.cs @@ -54,7 +54,7 @@ namespace DaikonForge.VoIP protected ulong nextFrameIndex = 0; protected ulong nextExpectedIndex = 0; - protected virtual void Awake() + protected virtual void init() { codec = GetCodec(); diff --git a/TestVelGameServer/Assets/NetworkPlayer.cs b/TestVelGameServer/Assets/NetworkPlayer.cs index 0c2dba2..4bc775f 100644 --- a/TestVelGameServer/Assets/NetworkPlayer.cs +++ b/TestVelGameServer/Assets/NetworkPlayer.cs @@ -83,6 +83,6 @@ public class NetworkPlayer : MonoBehaviour //base64 encode string b64_headers = Convert.ToBase64String(headers); string b64_data = Convert.ToBase64String(data); - manager.sendTo(1, "2," + b64_headers +","+b64_data + ";"); + manager.sendTo(0, "2," + b64_headers +","+b64_data + ";"); } }