diff --git a/EonaCat.VolumeMixer/EonaCat.VolumeMixer.csproj b/EonaCat.VolumeMixer/EonaCat.VolumeMixer.csproj index 2fafa65..d46805d 100644 --- a/EonaCat.VolumeMixer/EonaCat.VolumeMixer.csproj +++ b/EonaCat.VolumeMixer/EonaCat.VolumeMixer.csproj @@ -18,9 +18,9 @@ EonaCat, Audio, Volume, Mixer .NET Standard, Jeroen, Saey EonaCat VolumeMixer - 1.0.3 - 1.0.0.3 - 1.0.0.3 + 1.0.4 + 1.0.0.4 + 1.0.0.4 icon.png diff --git a/README.md b/README.md index 36c07de..04ff291 100644 --- a/README.md +++ b/README.md @@ -86,12 +86,7 @@ using EonaCat.VolumeMixer.Models; using System; using System.Threading.Tasks; -class Program -{ - // This file is part of the EonaCat project(s) which is released under the Apache License. - // See the LICENSE file or go to https://EonaCat.com/License for full license details. - [STAThread] - static async Task Main() + static async Task Main() { // Playback management example using (var volumeMixer = new VolumeMixerManager()) @@ -182,33 +177,11 @@ class Program { Console.WriteLine($"Error: {ex.Message}"); } - } - } -} -``` - -## Microphone management example: -```csharp -using EonaCat.VolumeMixer.Managers; -using EonaCat.VolumeMixer.Models; -using System; -using System.Threading.Tasks; - -class Program -{ - // This file is part of the EonaCat project(s) which is released under the Apache License. - // See the LICENSE file or go to https://EonaCat.com/License for full license details. - [STAThread] - static async Task Main() - { - // Microphone management example - using (var micManager = new MicrophoneManager()) - { try { // Get all microphones - var microphones = await micManager.GetMicrophonesAsync(); + var microphones = await volumeMixer.GetMicrophonesAsync(); Console.WriteLine($"Found {microphones.Count} microphones:"); foreach (var mic in microphones) @@ -220,7 +193,7 @@ class Program } // Default microphone - using (var defaultMic = await micManager.GetDefaultMicrophoneAsync()) + using (var defaultMic = await volumeMixer.GetDefaultMicrophoneAsync()) { Console.WriteLine($"\nSetting default microphone volume to 1%"); bool success = await defaultMic.SetMasterVolumeAsync(0.1f); @@ -250,15 +223,15 @@ class Program } } - Console.WriteLine($"Default mic volume: {await micManager.GetMicrophoneVolumeAsync():P0}"); - Console.WriteLine($"Default mic muted: {await micManager.GetMicrophoneMuteAsync()}"); + Console.WriteLine($"Default mic volume: {await volumeMixer.GetMicrophoneVolumeAsync():P0}"); + Console.WriteLine($"Default mic muted: {await volumeMixer.GetMicrophoneMuteAsync()}"); // Set microphone volume to 60% - bool result = await micManager.SetMicrophoneVolumeAsync(0.6f); + bool result = await volumeMixer.SetMicrophoneVolumeAsync(0.6f); Console.WriteLine($"Set microphone volume to 60%: {result}"); // Set specific microphone by name - result = await micManager.SetMicrophoneVolumeByNameAsync("USB", 0.7f); + result = await volumeMixer.SetMicrophoneVolumeByNameAsync("USB", 0.7f); Console.WriteLine($"Set USB microphone volume to 70%: {result}"); } @@ -268,5 +241,4 @@ class Program } } } -} ``` \ No newline at end of file