Updated README.md
This commit is contained in:
parent
0181b0c3b8
commit
c2043acbd3
15
README.md
15
README.md
|
@ -1,9 +1,8 @@
|
|||
# EonaCat.VolumeMixer
|
||||
|
||||
------------
|
||||
|
||||
The EonaCat.VolumeMixer library provides an interface to interact with individual audio sessions on Windows.
|
||||
It allows you to retrieve and modify the volume and mute state of a session, get session metadata, and access information about the associated process.
|
||||
|
||||
This class uses Windows Core Audio APIs via COM interop to manage audio sessions, making it suitable for applications that need fine-grained control over audio streams per process or session.
|
||||
|
||||
## Features
|
||||
|
@ -27,7 +26,7 @@ Requires Windows Vista or later with Core Audio APIs.
|
|||
|
||||
Must be run with permissions that allow access to audio session interfaces.
|
||||
|
||||
### Accessing session state:
|
||||
## Accessing session state:
|
||||
```csharp
|
||||
using EonaCat.VolumeMixer;
|
||||
|
||||
|
@ -40,7 +39,7 @@ uint processId = audioSession.ProcessId;
|
|||
AudioSessionState state = audioSession.State;
|
||||
```
|
||||
|
||||
### Obtaining current volume and mute state:
|
||||
## Obtaining current volume and mute state:
|
||||
```csharp
|
||||
// Get current volume (0.0 to 1.0)
|
||||
float volume = audioSession.GetVolume();
|
||||
|
@ -57,7 +56,7 @@ else
|
|||
}
|
||||
```
|
||||
|
||||
### Mute control:
|
||||
## Mute control:
|
||||
```csharp
|
||||
// Get mute status
|
||||
bool isMuted = audioSession.GetMute();
|
||||
|
@ -74,13 +73,13 @@ else
|
|||
}
|
||||
```
|
||||
|
||||
### Process Information:
|
||||
## Process Information:
|
||||
```csharp
|
||||
string processName = audioSession.GetProcessName();
|
||||
Console.WriteLine($"Audio session process: {processName}");
|
||||
```
|
||||
|
||||
### Playback management example:
|
||||
## Playback management example:
|
||||
```csharp
|
||||
using EonaCat.VolumeMixer.Managers;
|
||||
using EonaCat.VolumeMixer.Models;
|
||||
|
@ -189,7 +188,7 @@ class Program
|
|||
```
|
||||
|
||||
|
||||
### Microphone management example:
|
||||
## Microphone management example:
|
||||
```csharp
|
||||
using EonaCat.VolumeMixer.Managers;
|
||||
using EonaCat.VolumeMixer.Models;
|
||||
|
|
Loading…
Reference in New Issue