Updated README.md

This commit is contained in:
EonaCat 2025-07-22 21:45:08 +02:00
parent 050327f56d
commit 4b226f9601
2 changed files with 10 additions and 38 deletions

View File

@ -18,9 +18,9 @@
<PackageTags>EonaCat, Audio, Volume, Mixer .NET Standard, Jeroen, Saey</PackageTags>
<PackageReleaseNotes></PackageReleaseNotes>
<Description>EonaCat VolumeMixer</Description>
<Version>1.0.3</Version>
<AssemblyVersion>1.0.0.3</AssemblyVersion>
<FileVersion>1.0.0.3</FileVersion>
<Version>1.0.4</Version>
<AssemblyVersion>1.0.0.4</AssemblyVersion>
<FileVersion>1.0.0.4</FileVersion>
<PackageIcon>icon.png</PackageIcon>
</PropertyGroup>

View File

@ -86,11 +86,6 @@ 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()
{
// Playback management example
@ -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
}
}
}
}
```