summaryrefslogtreecommitdiff
path: root/libavdevice/alsa-audio.h
diff options
context:
space:
mode:
authorNicolas George <nicolas.george@normalesup.org>2011-03-10 12:10:34 +0100
committerNicolas George <nicolas.george@normalesup.org>2011-03-26 16:50:09 +0100
commit813dbb44424846274a318bfc6d02a53b4189f884 (patch)
tree6343ebd25d52e3c2ee587287a8a720f3b603c6ea /libavdevice/alsa-audio.h
parent98ac192b4e4df786107d7f6adb3e4e7d1336510e (diff)
ALSA: implement channel layout for playback.
Currently, only S16 quad, 5.1 and 7.1 are implemented. Implementing support for other formats/layouts and capture should be straightforward. 7.1 support by Carl Eugen Hoyos.
Diffstat (limited to 'libavdevice/alsa-audio.h')
-rw-r--r--libavdevice/alsa-audio.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/libavdevice/alsa-audio.h b/libavdevice/alsa-audio.h
index 949383157e..8c7c516585 100644
--- a/libavdevice/alsa-audio.h
+++ b/libavdevice/alsa-audio.h
@@ -39,10 +39,15 @@
other formats */
#define DEFAULT_CODEC_ID AV_NE(CODEC_ID_PCM_S16BE, CODEC_ID_PCM_S16LE)
+typedef void (*ff_reorder_func)(const void *, void *, int);
+
typedef struct {
snd_pcm_t *h;
int frame_size; ///< preferred size for reads and writes
int period_size; ///< bytes per sample * channels
+ ff_reorder_func reorder_func;
+ void *reorder_buf;
+ int reorder_buf_size; ///< in frames
} AlsaData;
/**
@@ -82,4 +87,6 @@ int ff_alsa_close(AVFormatContext *s1);
*/
int ff_alsa_xrun_recover(AVFormatContext *s1, int err);
+int ff_alsa_extend_reorder_buf(AlsaData *s, int size);
+
#endif /* AVDEVICE_ALSA_AUDIO_H */