mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-09-20 13:08:50 +02:00
55a5664363
The noise suppression filter mistakenly operated on the assumption that input audio data would always be in 10ms segments, and would crash if audio data was larger than that size. Because speexdsp operates on fixed audio frame sizes only, we must buffer audio data to fit that frame processing size. This creates a troublesome situation where you must buffer around that specified frame size. The new steps for processing are: 1. Push audio data to input circular buffer. 2. Push number of audio frames and timestamp for that audio packet to an 'info' circular buffer. 3. Check size of input circular buffer, and while it's equal to or above the speexdsp frame size (10ms for minimum latency), pop from the input buffer to a temporary buffer (10ms frames) and process it, then push that temporary buffer to the output circular buffer. 4. Peek at the front of the 'info' circular buffer. 5. If the output circular buffer frame size is equal or larger than next expected number of frames, pop both the info and output buffer, and return the audio data with the expected audio frames/timestamp. |
||
---|---|---|
.. | ||
data | ||
async-delay-filter.c | ||
chroma-key-filter.c | ||
CMakeLists.txt | ||
color-filter.c | ||
color-key-filter.c | ||
crop-filter.c | ||
gain-filter.c | ||
mask-filter.c | ||
noise-gate-filter.c | ||
noise-suppress-filter.c | ||
obs-filters-config.h.in | ||
obs-filters.c | ||
scale-filter.c | ||
scroll-filter.c | ||
sharpness-filter.c |