Andersama / obs-asio

ASIO plugin for OBS-Studio
GNU General Public License v3.0
664 stars 43 forks source link

ASIO OBS Plugin causes small audio stutters every 30-40 minutes [GoXLR Mini] #110

Closed cattywampus04 closed 2 years ago

cattywampus04 commented 2 years ago

Hello,

I'm having an issue with my setup. As far as I know it's been happening for months and months, but I've only just realised in the last few weeks that it's doing it.

I stream and record DJ sets using OBS. I plug my decks into the GoXLR's line in port. I like to record all audio on different tracks in OBS. In the GoXLR software, I can route the Line-in input to the "broadcast stream mix" device and capture that in OBS...but there is no way to capture the line-in input as it's own unique device in OBS. The only way to grab it is using the ASIO plugin (as far as I know anyway?).

Every 30-40ish minutes or so, there is a small skip of the audio. It's like half a second. The video is fine, it's not dropping frames or anything. I've been trying various things to see if I can see why it's doing it.

I tried disabling the "use device timestamps" for all the devices i could in OBS. I actually have 2 GoXLR minis for each of my computers. I tried recording on both computers and it does the same. If I record the "broadcast stream mix" in Audacity at the same time as recording in OBS, the Audacity recording is fine but the OBS recording has the stutters. The audio is reaching the PC from the decks perfectly fine.

Anyway...tonight I tried uninstalling the ASIO plugin from OBS and recorded...and low-and-behold, the recording has no skips. Given that all my previous recordings have had the skips, it's definitely a good sign that the ASIO plugin is the culprit...but I of course will be doing some more tests to confirm over the next few days.

But if we just assume that it is the ASIO plugin that is causing the skips, do you know what is happening? I have been working on the assumption that it is a audio syncing/timing thing? Like the audio recording is slipping in time ever so slightly and every 30-40minutes it checks it and resets it so it puts it back in sync? Ive never noticed any audio sync issues.

Does any of this sound like something that makes sense and that you can help with? Being able to record the line-in input directly has been kind of important. When I stream music stuff, I'm able to capture the line-in port and put a compressor that is linked to my mic input so when i speak it lowers the volume of the music so people can hear me. I would lose that functionality if had to go without the ASIO plugin as the only way to capture the line-in audio is route it to the "broadcast stream mix" in the GoXLR software and then capture that in OBS....but cause everything routes to the broadcast stream mix, I can't set a compressor on only the music for when my mic is activated. Hope that makes sense.

Really hoping you can help me out with this one. It's been driving me mad and now feeling semi-confident of figuring what the cause is feels like a big step forward.

Thanks

cattywampus04 commented 2 years ago

Apology's. Ignore that. I just heard a stutter in the recording that I didn't hear first time around. Gutted

Andersama commented 2 years ago

Well, I've no idea because it's been years since I was an obs dev, but there used to be an issue where obs would basically disable devices that were buffering too much. Like outright silence after some period of time even though the device was working fine. I can't remember if that got fixed while I was around...this sounds like a slight "patch" to that issue, or it could be a fault somewhere else. The plugin here shouldn't be buffering anything, I can't remember exactly how I set it up but there is a fairly large preallocated buffer.

In theory given that I'm pretty sure Juce is multithreaded that the plugin could wrap around on the circular buffer. That might be stutter-like.

Andersama commented 2 years ago

Another possibility since most of everything audio related is in some way threaded if you have massive cpu spikes etc... you could have device audio dropout because there's simply nothing processing the audio at the time, that'd be independent of any programs you use though.

Andersama commented 2 years ago

There are a few people who have issues with the Juce version of the plugin, if you're programming savy you could build that one and give that a go.

cattywampus04 commented 2 years ago

Hi there, I appreciate you taking the time to respond. I did consider a CPU spiking issue but they are both pretty power computers and I made sure to close any background running things throughout testing...so I am pretty confident it's not that.

I decided that I would uninstall OBS entirely on one of the computers, uninstalled any plugins I had, and also unplugged the GoXLR mini and uninstalled the drivers. I plugged the decks that I'm recording in to the line-in on my motherboards audio inputs.

I am 2/3s the way through a second recording now and I think there are no stutters. I recorded one last night and listened and was sure that there were no stutters, so then did a second recording tonight to confirm. I imagine as soon as I post this a skip will present itself and ruin things 😂

BUT...on the off chance it doesn't... that would give me at least a couple of ideas of where to look:

  1. The GoXLR itself...though I would be surprised...the GoXLR is pretty popular and I'd have thought if it was a common problem I'd have read about it already.
  2. A plugin I had installed for OBS -- I uninstalled the ASIO plugin, but I never uninstalled NDI and Websockets...and thinking bout it - NDI feels like a strong contender cause it has the audio element to it?

Do you have any opinions on this?

Again, big thanks for taking the time you already have to respond. I really appreciate it, especially considering it's not even your plugin that is causing it.

Andersama commented 2 years ago

Well my experience at the time of developing the plugin was that asio devices are a complete crapshoot in terms of drivers. However*, since some people have problems with the Juce version of the plugin and not the bass based one the reality is there's likely something off in how I used Juce or just Juce in general. But I'm not exactly motivated in maintaining the plugin.

WDM or KS are fairly solid, KS is pretty nice latency wise. It's definitely frustrating to have an asio device that you can't access the channels. (Might've been the motivation for the plugin to start with), so I get that. I'd say lean towards reliability if you've found a work around.