about summary refs log tree commit diff
path: root/ModerationClient/Program.cs
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2024-09-04 05:02:20 +0200
committerRory& <root@rory.gay>2024-09-04 05:02:20 +0200
commitd10417339b76bf2750f3e54f4e3b714dd3ed369a (patch)
tree2f0a51900228f3d4e241f9d8ac3001632ed5305d /ModerationClient/Program.cs
parentcgit url for libmatrix (diff)
downloadModerationClient-d10417339b76bf2750f3e54f4e3b714dd3ed369a.tar.xz
Diffstat (limited to '')
-rw-r--r--ModerationClient/Program.cs19
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]); + // } + } +}