Closed edvinasdi closed 2 years ago
would like to know if it's possible to get a single value from Write-AudioDevice -PlaybackStream
No, not that I know of by using the Write-AudioDevice cmdlet.
But it seems possible to get that single value by using the Get-AudioDevice cmdlet in the following way
[int]$Output = (Get-AudioDevice -Playback).Device.AudioMeterInformation.MasterPeakValue * 100
which, by the way, is basically what the Write-AudioDevice cmdlet does in a loop on a 100ms sleep timer.
Hi,
Im, like, very new on PowerShell scripts and would like to know if it's possible to get a single value from Write-AudioDevice -PlaybackStream command so I can use it afterwards to create a condition showing if something is playing or not and construct an if statement of it.