diff options
author | Lennart Poettering <lennart@poettering.net> | 2009-01-16 18:39:36 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2009-01-16 18:39:36 +0100 |
commit | 4a137637976360e94dfc304c291b3166b3c03970 (patch) | |
tree | 602a857f4aedf525d5776a51895bba49169fa2e2 /src/modules | |
parent | 6dc76d11583979ba73dbe4bbf54f52fc1af901e2 (diff) |
Add support for 24bit samples encoded in the LSB of 32 bit words
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/alsa/alsa-util.c | 8 | ||||
-rw-r--r-- | src/modules/oss/oss-util.c | 2 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/modules/alsa/alsa-util.c b/src/modules/alsa/alsa-util.c index 7616ad1d..04d23e0e 100644 --- a/src/modules/alsa/alsa-util.c +++ b/src/modules/alsa/alsa-util.c @@ -234,6 +234,8 @@ static int set_format(snd_pcm_t *pcm_handle, snd_pcm_hw_params_t *hwparams, pa_s [PA_SAMPLE_S32BE] = SND_PCM_FORMAT_S32_BE, [PA_SAMPLE_S24LE] = SND_PCM_FORMAT_S24_3LE, [PA_SAMPLE_S24BE] = SND_PCM_FORMAT_S24_3BE, + [PA_SAMPLE_S24_32LE] = SND_PCM_FORMAT_S24_LE, + [PA_SAMPLE_S24_32BE] = SND_PCM_FORMAT_S24_BE, }; static const pa_sample_format_t try_order[] = { @@ -241,6 +243,8 @@ static int set_format(snd_pcm_t *pcm_handle, snd_pcm_hw_params_t *hwparams, pa_s PA_SAMPLE_FLOAT32RE, PA_SAMPLE_S32NE, PA_SAMPLE_S32RE, + PA_SAMPLE_S24_32NE, + PA_SAMPLE_S24_32RE, PA_SAMPLE_S24NE, PA_SAMPLE_S24RE, PA_SAMPLE_S16NE, @@ -267,6 +271,10 @@ static int set_format(snd_pcm_t *pcm_handle, snd_pcm_hw_params_t *hwparams, pa_s *f = PA_SAMPLE_S24LE; else if (*f == PA_SAMPLE_S24LE) *f = PA_SAMPLE_S24BE; + else if (*f == PA_SAMPLE_S24_32BE) + *f = PA_SAMPLE_S24_32LE; + else if (*f == PA_SAMPLE_S24_32LE) + *f = PA_SAMPLE_S24_32BE; else if (*f == PA_SAMPLE_S16BE) *f = PA_SAMPLE_S16LE; else if (*f == PA_SAMPLE_S16LE) diff --git a/src/modules/oss/oss-util.c b/src/modules/oss/oss-util.c index fbe930cd..f8e11fd2 100644 --- a/src/modules/oss/oss-util.c +++ b/src/modules/oss/oss-util.c @@ -166,6 +166,8 @@ int pa_oss_auto_format(int fd, pa_sample_spec *ss) { [PA_SAMPLE_S32BE] = AFMT_QUERY, /* not supported */ [PA_SAMPLE_S24LE] = AFMT_QUERY, /* not supported */ [PA_SAMPLE_S24BE] = AFMT_QUERY, /* not supported */ + [PA_SAMPLE_S24_32LE] = AFMT_QUERY, /* not supported */ + [PA_SAMPLE_S24_32BE] = AFMT_QUERY, /* not supported */ }; pa_assert(fd >= 0); |