[pulseaudio-discuss] [PATCH 06/10] sconv: Check for SSE flag before initializing code

Tanu Kaskinen tanuk at iki.fi
Thu Jan 31 23:09:59 PST 2013


On Wed, 2013-01-30 at 11:04 +0100, Peter Meerwald wrote:
> From: Peter Meerwald <p.meerwald at bct-electronic.com>
> 
> Signed-off-by: Peter Meerwald <p.meerwald at bct-electronic.com>
> ---
>  src/pulsecore/sconv_sse.c |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/src/pulsecore/sconv_sse.c b/src/pulsecore/sconv_sse.c
> index 19de6fd..3b56a9c 100644
> --- a/src/pulsecore/sconv_sse.c
> +++ b/src/pulsecore/sconv_sse.c
> @@ -170,7 +170,8 @@ void pa_convert_func_init_sse(pa_cpu_x86_flag_t flags) {
>      if (flags & PA_CPU_X86_SSE2) {
>          pa_log_info("Initialising SSE2 optimized conversions.");
>          pa_set_convert_from_float32ne_function(PA_SAMPLE_S16LE, (pa_convert_func_t) pa_sconv_s16le_from_f32ne_sse2);
> -    } else {
> +    }
> +    else if (flags & PA_CPU_X86_SSE) {
>          pa_log_info("Initialising SSE optimized conversions.");
>          pa_set_convert_from_float32ne_function(PA_SAMPLE_S16LE, (pa_convert_func_t) pa_sconv_s16le_from_f32ne_sse);
>      }

Thanks, will apply. Regarding style: put else on the same line as the
if-closing brace. If you want to separate the else from the body of the
if block, use an empty line.

-- 
Tanu



More information about the pulseaudio-discuss mailing list