• J
    obs-filters: Buffer noise suppression audio data · 55a56643
    jp9000 提交于
    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.
    55a56643
noise-suppress-filter.c 6.9 KB