Resource icon

Asynchronous Audio Filter 0.3.0

Supported Bit Versions
  1. 64-bit
Source Code URL
https://github.com/norihiro/obs-async-audio-filter
Minimum OBS Studio Version
27.0.0
Supported Platforms
  1. Windows
  2. Mac OS X
  3. Linux
Introduction

This plugin tries to fix an asynchronous audio by synchronizing to the master clock of OBS Studio.

OBS Studio is running with a clock provided by the OS. On the other hand, some audio interfaces are running with their own clock to sample the audio, which is asynchronous from the OBS's clock.
The difference of these clocks causes the audio buffer to reach overflow or underflow after several minutes or more and causes OBS to drop a bunch of audio frames or to introduce silent frames.
clock-source-error.png


This filter will detect the difference and periodically add or remove an audio sample. Since just one sample is added or removed at each time, distortion should not be noticable.

Let's say an audio interface has 20 ppm slower clock than a nominal 48 kHz. You will get 47999 samples for each second. This plugin will add one sample every second so that the audio won't cause glitch nor drift.

How it works

Since the audio samples are buffered, it is not easy to detect the difference of the sampling frequency. This plugin implements a PLL-like mechanism to compare the difference of the clock sources in between the audio source and OBS.

Unlike the commercial sample rate converters (for example ADSP-2136x), the implementation is more simplified. There will be a small distortion. A Future release might improve this.

How to use
To use this filter, right-click your audio source, click `Filters`, and add `Asynchronous Audio Filter`.
adding-filter.png
If you have multiple audio sources, you might need to add the filter for each source.

Properties

Use OBS time


This plugin assumes the timestamp set by the audio source is calculated from the function os_gettime_ns.
If not, it is suggested to enable this option.

Verbosity

Increase or decrease verbosity in the log file.
0: lock/unlock state change, 1: every time when adding or removing a sample, 2 also output internal state for debugging.
  • Like
Reactions: YorVeX
Author
norihiro
Downloads
2,481
Views
9,345
First release
Last update
Rating
5.00 star(s) 1 ratings

More resources from norihiro

Latest updates

  1. Asynchronous Audio Filter 0.3.0

    This is an experimental release of Asynchronous Audio Filter for OBS Studio. Changes in 0.3.0...
  2. Asynchronous Audio Filter 0.2.1

    This is a hotfix release of Asynchronous Audio Filter for OBS Studio. Changes in 0.2.1 Fixed...
  3. Asynchronous Audio Filter 0.2.0

    This is an experimental release of Asynchronous Audio Filter for OBS Studio. Changes in 0.2.0...

Latest reviews

You're my hero! 5/5
I'll test it more, but so far - my insane Audient iD4 Mk.II problems with OBS 21 ms dropouts every 2-3 minutes appear to be gone.
Top