context: don't touch denormals settings when left unset

We should not influence the denormals CPU flag unless explicitly
requested in the config.
This commit is contained in:
Wim Taymans 2022-02-21 17:19:57 +01:00
parent edb5664017
commit 820e282a14

View file

@ -290,8 +290,7 @@ struct pw_context *pw_context_new(struct pw_loop *main_loop,
if (pw_properties_get(properties, PW_KEY_CPU_MAX_ALIGN) == NULL) if (pw_properties_get(properties, PW_KEY_CPU_MAX_ALIGN) == NULL)
pw_properties_setf(properties, PW_KEY_CPU_MAX_ALIGN, pw_properties_setf(properties, PW_KEY_CPU_MAX_ALIGN,
"%u", spa_cpu_get_max_align(cpu)); "%u", spa_cpu_get_max_align(cpu));
if ((str = pw_properties_get(properties, SPA_KEY_CPU_ZERO_DENORMALS)) == NULL) if ((str = pw_properties_get(properties, SPA_KEY_CPU_ZERO_DENORMALS)) != NULL)
str = "true";
spa_cpu_zero_denormals(cpu, spa_atob(str)); spa_cpu_zero_denormals(cpu, spa_atob(str));
} }