Commit fd9e3452 removed -ffast-math from the compile flags. Under some
conditions this may lead to massive slowdown of floating point operations
when underflows or denormals are encountered. In particular, this problem
was observed with the soxr resampler after applying
https://gitlab.freedesktop.org/pulseaudio/pulseaudio/merge_requests/120

Therefore this patch adds -ffast-math to the link flags of the pulseaudio
daemon. Linking with -ffast-math adds a procedure set_fast_math() to the
startup code of the daemon. On x86, the procedure sets bit 6 and 15 of the
mxcsr register. When these bits are set, denormals and results of
underflowing operations are truncated to 0.
2 files changed