[pulseaudio-discuss] [PATCH] sndfile-util: fix format for 24bit depth wav files

Tanu Kaskinen tanu.kaskinen at linux.intel.com
Wed Oct 9 10:19:39 CEST 2013

On Mon, 2013-10-07 at 09:43 -0700, Kiran Krishnappa wrote:
> PA_SAMPLE_24NE generated in pa_sndfile_read_sample_spec is not
> handled in pa_sndfile_readf_function. paplay used to get aborted
> for 24bit depth wav files

How does paplay now behave? I suppose it still isn't able to play 24bit
files, so does it exit cleanly?

> ---
>  src/pulsecore/sndfile-util.c |    3 +++
>  1 file changed, 3 insertions(+)
> diff --git a/src/pulsecore/sndfile-util.c b/src/pulsecore/sndfile-util.c
> index 0820ee4..46689af 100644
> --- a/src/pulsecore/sndfile-util.c
> +++ b/src/pulsecore/sndfile-util.c
> @@ -386,6 +386,9 @@ pa_sndfile_readf_t pa_sndfile_readf_function(const pa_sample_spec *ss) {
>          case PA_SAMPLE_ALAW:
>              return NULL;
> +        case PA_SAMPLE_S24NE:
> +            return NULL;

I'd prefer the case to be grouped together with ULAW and ALAW, since in
all of the three cases the end result is the same: return NULL.

Also, this same problem is in pa_sndfile_writef_function(). In the bug
report there is a "parecord" command that triggers a crash in
pa_sndfile_writef_function(). If you could fix also
pa_sndfile_writef_function() and test how parecord behaves after that,
your patch will go in sooner (if you don't do this, I'll do the changes
and testing myself when I have time).


More information about the pulseaudio-discuss mailing list