Neos-Metaverse / NeosPublic

A public issue/wiki only repository for the NeosVR project
197 stars 9 forks source link

Audio playback fails to resume after Vive Wireless reconnects during play #1013

Open enziv opened 3 years ago

enziv commented 3 years ago

First issue, happy to provide more information if needed.

When Vive Wireless is disconnected, the audio device is completely removed (not set to disconnected.) Before 9.5.1190 Neos audio playback would be switched to the last default device, and then back to the Vive Wireless module when it re-connects. Now only the microphone input is regained. Neos will not resume audio playback on any device and has to be restarted to emit any sound.

Here's a snippet from the log during a disconnect/reconnect.


  at CSCore.CoreAudioAPI.CoreAudioAPIException.Try (System.Int32 result, System.String interfaceName, System.String member) [0x0000c] in <73b9ddd30919445a8624fce4facab86d>:0 
  at CSCore.CoreAudioAPI.AudioCaptureClient.GetNextPacketSize () [0x00008] in <73b9ddd30919445a8624fce4facab86d>:0 
  at CSCore.SoundIn.WasapiCapture.ReadData (System.Byte[] buffer, CSCore.CoreAudioAPI.AudioCaptureClient captureClient, System.UInt32 frameSize) [0x00000] in <73b9ddd30919445a8624fce4facab86d>:0 
  at CSCore.SoundIn.WasapiCapture.CaptureProc (System.Object param) [0x000c6] in <73b9ddd30919445a8624fce4facab86d>:0 
2:00:50 AM.440 ( 27 FPS)    Audio capture stopped, restarting: CSCore.CoreAudioAPI.CoreAudioAPIException (0x88890004): IAudioCaptureClient::GetNextPacketSize caused an error: 0x88890004, "Unknown HRESULT".
  at CSCore.CoreAudioAPI.CoreAudioAPIException.Try (System.Int32 result, System.String interfaceName, System.String member) [0x0000c] in <73b9ddd30919445a8624fce4facab86d>:0 
  at CSCore.CoreAudioAPI.AudioCaptureClient.GetNextPacketSize () [0x00008] in <73b9ddd30919445a8624fce4facab86d>:0 
  at CSCore.SoundIn.WasapiCapture.ReadData (System.Byte[] buffer, CSCore.CoreAudioAPI.AudioCaptureClient captureClient, System.UInt32 frameSize) [0x00000] in <73b9ddd30919445a8624fce4facab86d>:0 
  at CSCore.SoundIn.WasapiCapture.CaptureProc (System.Object param) [0x000c6] in <73b9ddd30919445a8624fce4facab86d>:0 ```
Frooxius commented 3 years ago

I'm sorry, but I don't think we can help with this. Vive Wireless is handled by external drivers by HTC, Neos doesn't have any code to handle this or the audio output, so you'll have to check there.

Normally the audio output will automatically switch regardless of device, but that's not handled on Neos' end either, so there's not too much that I can do. The log snippet you posted doesn't contain anything relevant to audio output, Neos only handles the audio input.

Was there any update to Vive Wireless drivers or settings perhaps? Or something in Steam, perhaps the mirroring settings? What if you change the audio device in Windows after it breaks?

enziv commented 3 years ago

If that's the case then I might try reinstalling my audio drivers, HMD software, and updating my BIOS (looks like I'm due anyways). You're probably right and it may be getting caught up somewhere in the drivers, if that's the case on Neos' end.

After the disconnect, the window itself doesn't send any audio regardless of what device it's assigned to, but other audio (VR apps, the desktop, etc) is regained. Volume's on in the mixer, Steam mirroring's off, the Vive software didn't update when this started.