Initial migration commit to .NET 7

Menu, sync and other stuff except resource system should be working.
We're far from finished
This commit is contained in:
Sardelka9515
2023-01-28 20:51:29 +08:00
parent 0112140f0e
commit cac2385c35
107 changed files with 36610 additions and 267320 deletions

View File

@ -5,6 +5,7 @@ namespace RageCoop.Client
{
internal static class Voice
{
private static bool _stopping = false;
private static WaveInEvent _waveIn;
private static readonly BufferedWaveProvider _waveProvider =
@ -30,7 +31,8 @@ namespace RageCoop.Client
if (_thread != null && _thread.IsAlive)
{
_thread.Abort();
_stopping = true;
_thread.Join();
_thread = null;
}
}
@ -51,9 +53,9 @@ namespace RageCoop.Client
return;
// I tried without thread but the game will lag without
_thread = new Thread(() =>
_thread = ThreadManager.CreateThread(() =>
{
while (true)
while (!_stopping && !Main.IsUnloading)
using (var wo = new WaveOutEvent())
{
wo.Init(_waveProvider);
@ -61,8 +63,7 @@ namespace RageCoop.Client
while (wo.PlaybackState == PlaybackState.Playing) Thread.Sleep(100);
}
});
_thread.Start();
},"Voice");
}
public static void StartRecording()