Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WASAPI bugs OBS audio buffer #81

Open
hwangbro opened this issue Jan 26, 2021 · 1 comment
Open

WASAPI bugs OBS audio buffer #81

hwangbro opened this issue Jan 26, 2021 · 1 comment

Comments

@hwangbro
Copy link

hwangbro commented Jan 26, 2021

When using WASAPI engine, using any emulator function that pauses emulation (save/load states, load rom, pause, frame step, changing settings) causes audio buffer issues in OBS. After "max audio buffer" reached, I'm still able to hear the game audio and it appears in the audio bar in OBS, but the recording will not contain game audio. Below is an excerpt from my OBS log, the last few lines show the behavior. Using DirectSound seems to fix this issue for me.

21:35:10.884: [Loaded global audio device]: 'Desktop Audio'
21:35:10.884:     - filter: 'Gain' (gain_filter)
21:35:10.896: WASAPI: Device 'Microphone (2- Antlion USB Microphone)' [48000 Hz] initialized
21:35:10.896: [Loaded global audio device]: 'Mic/Aux'
21:35:10.920: adding 42 milliseconds of audio buffering, total audio buffering is now 42 milliseconds (source: Mic/Aux)

21:35:13.438: [game-capture: 'Gambatte'] attempting to hook process: gambatte_speedrun.exe
21:35:14.037: [game-capture: 'Gambatte'] d3d9 shared texture capture successful
21:35:14.054: [game-capture: 'Gambatte'] shared texture capture successful
21:35:33.529: Max audio buffering reached!
21:35:33.529: adding 917 milliseconds of audio buffering, total audio buffering is now 960 milliseconds (source: Desktop Audio)```
@entrpntr
Copy link
Contributor

Possible solution on the OBS side from here:

Some audio devices do not send proper timestamps, and can cause various issues, such as audio desync. Try disabling the device timestamps in OBS by clicking the Gear icon next to your audio source, select Properties, and then uncheck "Use device timestamps."

Not sure if anyone else has run across this issue in GSR (I couldn't replicate it), but googling shows a handful of people have ran into this with OBS, and wrong timestamps seem to be the root cause behind adding to the audio buffer. It's still possible GSR might have some complicity in this behavior somewhere in its WASAPI engine code, given the specific way you're able to induce it.

Since DirectSound has been deprecated for a while and WASAPI is generally recommended, this may warrant a closer look even if the above solution is a successful workaround.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants