small fix

This commit is contained in:
Nick I. A
2022-08-13 02:39:18 +02:00
parent edae7a075a
commit f9a411833a
2 changed files with 3 additions and 3 deletions

View File

@ -27,6 +27,7 @@ namespace RageCoop.Client.Sync
public static void InitRecording()
{
// I tried without thread but the game will lag without
_thread = new Thread(new ThreadStart(() =>
{
while (true)
@ -43,7 +44,6 @@ namespace RageCoop.Client.Sync
}
}
}));
_thread.Start();
_waveIn = new WaveInEvent
@ -79,6 +79,7 @@ namespace RageCoop.Client.Sync
try
{
_waveProvider.AddSamples(e.Buffer, 0, e.BytesRecorded);
Networking.SendVoiceMessage(e.Buffer);
} catch (Exception ex)
{

View File

@ -487,8 +487,7 @@ namespace RageCoop.Server
case PacketType.Voice:
{
var msg = MainNetServer.CreateMessage();
Packets.Voice packet = data.GetPacket<Packets.Voice>();
packet.Deserialize(data);
data.GetPacket<Packets.Voice>().Pack(msg);
MainNetServer.SendMessage(msg, MainNetServer.Connections, NetDeliveryMethod.ReliableOrdered, (int)ConnectionChannel.Voice);
}
break;