[pulseaudio-discuss] [PATCH 2/8] modules: Fix dead code in oss-util

Arun Raghavan arun at accosted.net
Mon Sep 14 21:19:56 PDT 2015


On Mon, 2015-09-14 at 18:07 +0200, Peter Meerwald wrote:
> From: Peter Meerwald <p.meerwald at bct-electronic.com>
> 
> CID 1323599
> 
> if ioctl(SNDCTL_DSP_SETFMT) is successful, use the format
> ---
>  src/modules/oss/oss-util.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/modules/oss/oss-util.c b/src/modules/oss/oss-util.c
> index 42ee7f5..ad03ddc 100644
> --- a/src/modules/oss/oss-util.c
> +++ b/src/modules/oss/oss-util.c
> @@ -189,7 +189,7 @@ int pa_oss_auto_format(int fd, pa_sample_spec
> *ss) {
>                  } else
>                      ss->format = PA_SAMPLE_U8;
>              } else
> -                ss->format = f == AFMT_S16_LE ? PA_SAMPLE_S16LE :
> PA_SAMPLE_S16BE;
> +                ss->format = f;

Is this actually correct? ss->format is a pa_sample_format_t but f is
an OSS format enum type, which is why the old code was written that way
.

-- Arun


More information about the pulseaudio-discuss mailing list