summaryrefslogtreecommitdiffstats
path: root/src/pulsecore/svolume_mmx.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2009-09-09 04:28:22 +0200
committerLennart Poettering <lennart@poettering.net>2009-09-09 04:28:22 +0200
commit71e066c873e5bd31bd446ac0f8d0e97cc0b12ace (patch)
treed28cdd3a39fa26fe35eb78bea0a4d2dd2b26e18b /src/pulsecore/svolume_mmx.c
parent1f0904b800d9d69698e79ce0435a2777d5f7ec27 (diff)
simd: be more precise which SIMD optimizations we activate
Diffstat (limited to 'src/pulsecore/svolume_mmx.c')
-rw-r--r--src/pulsecore/svolume_mmx.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/pulsecore/svolume_mmx.c b/src/pulsecore/svolume_mmx.c
index 8510b0c4..74918e78 100644
--- a/src/pulsecore/svolume_mmx.c
+++ b/src/pulsecore/svolume_mmx.c
@@ -301,13 +301,16 @@ static void run_test (void) {
void pa_volume_func_init_mmx (pa_cpu_x86_flag_t flags) {
#if defined (__i386__) || defined (__amd64__)
- pa_log_info("Initialising MMX optimized functions.");
#ifdef RUN_TEST
run_test ();
#endif
- pa_set_volume_func (PA_SAMPLE_S16NE, (pa_do_volume_func_t) pa_volume_s16ne_mmx);
- pa_set_volume_func (PA_SAMPLE_S16RE, (pa_do_volume_func_t) pa_volume_s16re_mmx);
+ if (flags & PA_CPU_X86_MMX) {
+ pa_log_info("Initialising MMX optimized functions.");
+
+ pa_set_volume_func (PA_SAMPLE_S16NE, (pa_do_volume_func_t) pa_volume_s16ne_mmx);
+ pa_set_volume_func (PA_SAMPLE_S16RE, (pa_do_volume_func_t) pa_volume_s16re_mmx);
+ }
#endif /* defined (__i386__) || defined (__amd64__) */
}