About Myself
● Author of some sound processing code– Dcaenc: a Free DTS-compatible encoder
– Wine resampler
● Dayjob:
Common effects
● Equalizer presets– Sound Mode, Listening Modes
● Virtual Surround– Theater-Dimensional Mode
● Dynamic Range Compression– Late-Night Mode
● User EQ● ClearVoice II
● Bass, Tremble● Speaker Distance
Compensation● Bass Management● Digital room
Correction
DSP-related functionality
● Equalizer● Resampler● Channel Remixer● Virtual Surround
● Bass Management● Encoders & Decoders● LADSPA Effects● Echo Cancellation
In this talk
● Equalizer● Resampler● Channel Remixer● Virtual Surround
● Bass Management● Encoders & Decoders● LADSPA Effects● Echo Cancellation
FIR filter design
● Given the desired frequency response– Take IFFT
– Shift the signal to positive time values
– Truncate the signal to a suitable length
– Apply a windowing function
http://www.dspguide.com/ch17/1.htm
Overlap-Save
Corrupted fragment
The input signal is split into overlapping segmentsCorrupted fragments are thrown away(the previous segment contains a non-corrupted version)
Overlap-Add
Space for growth
Pad the input signal fragments with zeroesPerform circular convolutionResult: overlapped segments of output signalResolve the overlap by summation
module-equalizer-sink
● Where is this?– Take IFFT
– Shift the signal to positive time values
– Truncate the signal to a suitable length
– Apply a windowing function
module-equalizer-sink
/* FIXME: Please clean this up. I see more commented code lines * than uncommented code lines. I am sorry, but I am too dumb to * understand this. */
fftwf_malloc(); …; free();
Buffer Overflow
module-virtual-surround-sink
● Convolution with HRIR (Head Related Impulse Response)– HRIR has to be downloaded separately
Virtual Surround on Speakers
● Ambiophonics– Speaker crosstalk cancellation
– Same technology as in soundbars
– Not in PulseAudio yet