diff options
author | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2011-06-13 21:16:30 +0200 |
---|---|---|
committer | Reinhard Tartler <siretart@tauware.de> | 2011-06-23 09:13:55 +0200 |
commit | bf5ed476ba6315daeff83930787cdf02aa3268e0 (patch) | |
tree | d1bfca7b6e9b6c028101f24852759e16cac15b3d | |
parent | fcd26ebc8f371612e56e9f591b578d519e04c4c2 (diff) | |
download | ffmpeg-bf5ed476ba6315daeff83930787cdf02aa3268e0.tar.gz |
alsa: add support for more formats.
Specifically, f32, f64, s32, s24, a-law and mu-law.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
(cherry picked from commit 921715edffbba5db8deb26b7ad3cb583ba963d03)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
-rw-r--r-- | libavdevice/alsa-audio-common.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libavdevice/alsa-audio-common.c b/libavdevice/alsa-audio-common.c index ff6c9f875d..4279790ddc 100644 --- a/libavdevice/alsa-audio-common.c +++ b/libavdevice/alsa-audio-common.c @@ -36,9 +36,19 @@ static av_cold snd_pcm_format_t codec_id_to_pcm_format(int codec_id) { switch(codec_id) { + case CODEC_ID_PCM_F64LE: return SND_PCM_FORMAT_FLOAT64_LE; + case CODEC_ID_PCM_F64BE: return SND_PCM_FORMAT_FLOAT64_BE; + case CODEC_ID_PCM_F32LE: return SND_PCM_FORMAT_FLOAT_LE; + case CODEC_ID_PCM_F32BE: return SND_PCM_FORMAT_FLOAT_BE; + case CODEC_ID_PCM_S32LE: return SND_PCM_FORMAT_S32_LE; + case CODEC_ID_PCM_S32BE: return SND_PCM_FORMAT_S32_BE; + case CODEC_ID_PCM_S24LE: return SND_PCM_FORMAT_S24_3LE; + case CODEC_ID_PCM_S24BE: return SND_PCM_FORMAT_S24_3BE; case CODEC_ID_PCM_S16LE: return SND_PCM_FORMAT_S16_LE; case CODEC_ID_PCM_S16BE: return SND_PCM_FORMAT_S16_BE; case CODEC_ID_PCM_S8: return SND_PCM_FORMAT_S8; + case CODEC_ID_PCM_MULAW: return SND_PCM_FORMAT_MU_LAW; + case CODEC_ID_PCM_ALAW: return SND_PCM_FORMAT_A_LAW; default: return SND_PCM_FORMAT_UNKNOWN; } } |