mirror of
https://github.com/onyx-and-iris/voicemeeter-api-powershell.git
synced 2026-04-18 13:33:31 +00:00
recorder tests, tests pass
more reliable way to locate the recording pester tests pass for all kinds manual tests pass for all kinds - video vban.outstream.route - eq.channel.cell.gain range
This commit is contained in:
@@ -11,12 +11,18 @@ function Test-RecDir ([object]$vmr, [string]$recDir) {
|
||||
|
||||
|
||||
try {
|
||||
$start = Get-Date
|
||||
$vmr.recorder.record()
|
||||
Start-Sleep -Milliseconds 10
|
||||
$stamp = '{0:yyyy-MM-dd} at {0:HH}h{0:mm}m{0:ss}s' -f (Get-Date)
|
||||
Start-Sleep -Milliseconds 2000
|
||||
|
||||
$tmp = Join-Path $recDir ("{0} {1}.{2}" -f $prefix, $stamp, $filetype)
|
||||
$tmp = Get-ChildItem -Path $recDir -Filter ("{0}*.{1}" -f $prefix, $filetype) -ErrorAction SilentlyContinue |
|
||||
Where-Object { $_.LastWriteTime -gt $start } |
|
||||
Sort-Object LastWriteTime -Descending |
|
||||
Select-Object -First 1
|
||||
|
||||
if (-not $tmp) {
|
||||
throw "'$filetype' file with prefix '$prefix' was not found in '$recDir'."
|
||||
}
|
||||
|
||||
$vmr.recorder.stop()
|
||||
$vmr.recorder.eject()
|
||||
|
||||
Reference in New Issue
Block a user