mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-07 13:30:03 -05:00
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.
This commit is contained in:
parent
e896fdc080
commit
3929798a53
2 changed files with 3 additions and 2 deletions
|
|
@ -175,9 +175,9 @@ PREOPEN_LIBS = $(modlibexec_LTLIBRARIES)
|
|||
endif
|
||||
|
||||
if FORCE_PREOPEN
|
||||
pulseaudio_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS) $(IMMEDIATE_LDFLAGS) -dlpreopen force $(foreach f,$(PREOPEN_LIBS),-dlpreopen $(f))
|
||||
pulseaudio_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS) $(IMMEDIATE_LDFLAGS) -ffast-math -dlpreopen force $(foreach f,$(PREOPEN_LIBS),-dlpreopen $(f))
|
||||
else
|
||||
pulseaudio_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS) $(IMMEDIATE_LDFLAGS) -dlopen force $(foreach f,$(PREOPEN_LIBS),-dlopen $(f))
|
||||
pulseaudio_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS) $(IMMEDIATE_LDFLAGS) -ffast-math -dlopen force $(foreach f,$(PREOPEN_LIBS),-dlopen $(f))
|
||||
endif
|
||||
|
||||
if HAVE_SYSTEMD_DAEMON
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ executable('pulseaudio',
|
|||
pulseaudio_headers,
|
||||
install: true,
|
||||
include_directories : [configinc, topinc],
|
||||
link_args : ['-ffast-math'],
|
||||
link_with : [libpulsecore, libpulsecommon, libpulse],
|
||||
dependencies : [ltdl_dep, cap_dep, dbus_dep, libsystemd_dep],
|
||||
c_args : pa_c_args,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue