Commit 019a895
Enable audio input device selection on Windows
Add AudioDeviceId property to BaseOptions for Windows, allowing
consumers to select a specific audio capture device (e.g. Bluetooth
headset, USB microphone) by device ID.
Changes:
- Add BaseOptions.windows.cs with AudioDeviceId string property
- Pass AudioDeviceId to MediaCaptureInitializationSettings when
specified, before initializing MediaCapture
Usage:
// Enumerate available capture devices
var selector = MediaDevice.GetAudioCaptureSelector();
var devices = await DeviceInformation.FindAllAsync(selector);
var btDevice = devices.FirstOrDefault(d => d.Name.Contains("AirPods"));
var recorder = audioManager.CreateRecorder(new AudioRecorderOptions
{
AudioDeviceId = btDevice?.Id
});
Companion to #208 (iOS/macCatalyst) and #209 (Android).
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 1dd3d29 commit 019a895
2 files changed
Lines changed: 22 additions & 0 deletions
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
52 | 58 | | |
53 | 59 | | |
54 | 60 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
0 commit comments