[FFmpeg-devel] [PATCH 2/4] lavd/alsa: add reordering for f64 format.

Nicolas George nicolas.george at normalesup.org
Sat Feb 2 17:42:23 CET 2013


Signed-off-by: Nicolas George <nicolas.george at normalesup.org>
---
 libavdevice/alsa-audio-common.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/libavdevice/alsa-audio-common.c b/libavdevice/alsa-audio-common.c
index 954535e..47ef3c5 100644
--- a/libavdevice/alsa-audio-common.c
+++ b/libavdevice/alsa-audio-common.c
@@ -80,7 +80,8 @@ static void alsa_reorder_ ## NAME ## _ ## LAYOUT(const void *in_v,          \
 #define MAKE_REORDER_FUNCS(CHANNELS, LAYOUT, MAP) \
     MAKE_REORDER_FUNC(int8,  int8_t,  CHANNELS, LAYOUT, MAP) \
     MAKE_REORDER_FUNC(int16, int16_t, CHANNELS, LAYOUT, MAP) \
-    MAKE_REORDER_FUNC(int32, int32_t, CHANNELS, LAYOUT, MAP)
+    MAKE_REORDER_FUNC(int32, int32_t, CHANNELS, LAYOUT, MAP) \
+    MAKE_REORDER_FUNC(f64,   double,  CHANNELS, LAYOUT, MAP)
 
 MAKE_REORDER_FUNCS(5, out_50, \
         out[0] = in[0]; \
@@ -115,6 +116,7 @@ switch(size) {\
     case 1: s->reorder_func = alsa_reorder_int8_out_ ##layout;  break;\
     case 2: s->reorder_func = alsa_reorder_int16_out_ ##layout; break;\
     case 4: s->reorder_func = alsa_reorder_int32_out_ ##layout; break;\
+    case 8: s->reorder_func = alsa_reorder_f64_out_ ##layout;   break;\
 }
 
 static av_cold int find_reorder_func(AlsaData *s, int codec_id, uint64_t layout, int out)
@@ -144,6 +146,8 @@ static av_cold int find_reorder_func(AlsaData *s, int codec_id, uint64_t layout,
     case AV_CODEC_ID_PCM_U32BE:
     case AV_CODEC_ID_PCM_F32LE:
     case AV_CODEC_ID_PCM_F32BE: size = 4; break;
+    case AV_CODEC_ID_PCM_F64LE:
+    case AV_CODEC_ID_PCM_F64BE: size = 8; break;
     default:                 return AVERROR(ENOSYS);
     }
 
-- 
1.7.10.4



More information about the ffmpeg-devel mailing list