Fix Muninn Raven audio activation
This commit is contained in:
parent
28573be1d5
commit
b95b54d54d
2 changed files with 20 additions and 2 deletions
|
|
@ -49,3 +49,14 @@ Activation is explicit:
|
|||
That Raven activation starts the requested screen and Realtek loopback stream
|
||||
and publishes `muninn.capture_stream.v1`. Mimir and OBS are stream consumers;
|
||||
they do not own Muninn.
|
||||
|
||||
The deployed loopback helper must accept Muninn's command contract:
|
||||
|
||||
```powershell
|
||||
wasapi-loopback-capture.ps1 -Output stdout -Device Realtek -SampleRate 48000 -Channels 2
|
||||
```
|
||||
|
||||
`stdout` is an alias for binary standard output, and `Device` is the requested
|
||||
render-device hint. Current helper builds may ignore the hint and use the
|
||||
default render endpoint, but they must accept the argument so Muninn's generated
|
||||
mux command remains executable.
|
||||
|
|
|
|||
|
|
@ -9,7 +9,8 @@ param(
|
|||
[int] $Port = 5200,
|
||||
[string] $ObsTargetHost = "10.77.0.2",
|
||||
[int] $ObsPort = 5204,
|
||||
[string] $AudioDevice = "Realtek"
|
||||
[string] $AudioDevice = "Realtek",
|
||||
[switch] $NoObsTarget
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
|
@ -29,10 +30,16 @@ Get-CimInstance Win32_Process |
|
|||
ForEach-Object { taskkill.exe /PID `$_.ProcessId /T /F | Out-Null }
|
||||
`$muninnDir = Split-Path -Parent "$MuninnExe"
|
||||
`$launcher = Join-Path `$muninnDir "activate-raven-av-srt.cmd"
|
||||
`$obsArgs = ""
|
||||
if (-not [bool]::Parse("$($NoObsTarget.IsPresent)") -and -not ("$TargetHost" -eq "$ObsTargetHost" -and $Port -eq $ObsPort)) {
|
||||
`$obsArgs = " --obs-target-host ""$ObsTargetHost"" --obs-port $ObsPort"
|
||||
} else {
|
||||
`$obsArgs = " --no-obs-target"
|
||||
}
|
||||
`$lines = @(
|
||||
"@echo off",
|
||||
"cd /d ""`$muninnDir""",
|
||||
"""$MuninnExe"" activate --store ""$StorePath"" --host raven --stream muninn.raven.av.srt --target-host ""$TargetHost"" --port $Port --obs-target-host ""$ObsTargetHost"" --obs-port $ObsPort --audio-device ""$AudioDevice"" --ffmpeg ""$Ffmpeg"" --loopback-script ""$LoopbackScript"" --log-root ""$LogRoot"" 1>>""$LogRoot\muninn-activate.out.log"" 2>>""$LogRoot\muninn-activate.err.log"""
|
||||
"""$MuninnExe"" activate --store ""$StorePath"" --host raven --stream muninn.raven.av.srt --target-host ""$TargetHost"" --port $Port`$obsArgs --audio-device ""$AudioDevice"" --ffmpeg ""$Ffmpeg"" --loopback-script ""$LoopbackScript"" --log-root ""$LogRoot"" 1>>""$LogRoot\muninn-activate.out.log"" 2>>""$LogRoot\muninn-activate.err.log"""
|
||||
)
|
||||
Set-Content -LiteralPath `$launcher -Value `$lines -Encoding ASCII
|
||||
cmd /c "schtasks /Delete /TN GameCult-Muninn-Activate /F 2>NUL"
|
||||
|
|
|
|||
Loading…
Reference in a new issue