From 55ade960f2f3dc135f5e819b675b994ae176c899 Mon Sep 17 00:00:00 2001 From: pblivingston <71585805+pblivingston@users.noreply.github.com> Date: Wed, 4 Mar 2026 20:02:18 -0500 Subject: [PATCH] update docs --- CHANGELOG.md | 14 ++++++++++++++ README.md | 29 ++++++++++++++++++++++++++++- 2 files changed, 42 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1be3e0f..c5bdd2e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,20 @@ Before any major/minor/patch is released all unit tests will be run to verify th ## [Unreleased] These changes have not been added to PSGallery yet +### Added + +- New Remote methods for device enumeration: + - GetInputCount() + - GetOutputCount() + - GetInputDevice($index) + - GetOutputDevice($index) + +- New IODevice property `driver` to get the driver type of the current device (e.g. 'WDM', 'MME', etc.) + +- New IODevice methods to get, set, or clear the current device for a strip or bus: + - Get(): returns a PSObject with properties Driver, Name, HardwareId, and IsOutput + - Set($device): accepts a PSObject with properties Driver, Name, and IsOutput + - Clear() ## [4.1.0] - 2025-12-23 diff --git a/README.md b/README.md index 861374f..96ba1c0 100644 --- a/README.md +++ b/README.md @@ -368,20 +368,32 @@ $vmr.bus[0].FadeBy(-10, 500) The following Strip.device | Bus.device properties are available: - name: string +- driver: string - sr: int - wdm: string - ks: string - mme: string - asio: string +The following Strip.device | Bus.device methods are available: + +- Set($device) : PSObject, where device is a PSObject with properties Driver and Name +- Get() : PSObject, returns a PSObject with properties Driver, Name, HardwareId, and IsOutput +- Clear() : Clears the currently selected device + for example: ```powershell $vmr.strip[0].device.wdm = "Mic|Line|Instrument 1 (Audient EVO4)" $vmr.bus[0].device.name | Write-Host + +$device = $vmr.strip[3].device.Get() +$vmr.strip[1].device.Set($device) # moves the device selected for strip 4 to strip 2 + +$vmr.bus[2].device.Clear() ``` -name, sr are defined as read only. +name, driver, sr are defined as read only. wdm, ks, mme, asio are defined as write only. asio only defined for Bus[0].Device @@ -793,6 +805,21 @@ Access to lower level polling functions are provided with these functions: - `$vmr.PDirty`: Returns true if a parameter has been updated. - `$vmr.MDirty`: Returns true if a macrobutton has been updated. +Access to lower level device enumeration functions are provided with these functions: + +- `$vmr.GetInputCount()`: Returns the number of available input devices. +- `$vmr.GetOutputCount()`: Returns the number of available output devices. +- `$vmr.GetInputDevice($index)`: Returns a PSObject with properties Driver, Name, HardwareId, and IsOutput for the input device at the given index. +- `$vmr.GetOutputDevice($index)`: Returns a PSObject with properties Driver, Name, HardwareId, and IsOutput for the output device at the given index. + +```powershell +$count = $vmr.GetInputCount() +for ($i = 0; $i -lt $count; $i++) { + $device = $vmr.GetInputDevice($i) + Write-Host "Input Device $i: $($device.Driver) - $($device.Name)" +} +``` + ### Errors - `VMRemoteError`: Base custom error class.