diff options
Diffstat (limited to 'ModerationClient/Program.cs')
-rw-r--r-- | ModerationClient/Program.cs | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/ModerationClient/Program.cs b/ModerationClient/Program.cs index 9229194..82e10aa 100644 --- a/ModerationClient/Program.cs +++ b/ModerationClient/Program.cs @@ -1,10 +1,12 @@ -using Avalonia; +using Avalonia; using System; +using System.IO; +using System.Threading; +using System.Threading.Tasks; namespace ModerationClient; -internal sealed class Program -{ +internal sealed class Program { // Initialization code. Don't use any Avalonia, third-party APIs or any // SynchronizationContext-reliant code before AppMain is called: things aren't initialized // yet and stuff might break. @@ -18,4 +20,13 @@ internal sealed class Program .UsePlatformDetect() .WithInterFont() .LogToTrace(); -} \ No newline at end of file + + // private static FileStream f = new("/dev/input/by-path/platform-pcspkr-event-spkr", FileMode.Open, FileAccess.Write, FileShare.Write, 24); + public static void Beep(short freq, short duration) { + // f.Write([..new byte[16], 0x12, 0x00, 0x02, 0x00, (byte)(freq & 0xFF), (byte)((freq >> 8) & 0xFF), 0x00, 0x00]); + // if (duration > 0) { + // Thread.Sleep(duration); + // f.Write([..new byte[16], 0x12, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00]); + // } + } +} |