From ee35a063b2c10564d43a611fcf6ada398851b1d6 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 17 May 2006 18:52:34 +0000 Subject: add new channel map argument to pa_simple_new() git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@911 fefdeb5f-60dc-0310-8127-8f9354f1896f --- src/polyp/simple.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/polyp/simple.c') diff --git a/src/polyp/simple.c b/src/polyp/simple.c index b56406c9..84c46bf1 100644 --- a/src/polyp/simple.c +++ b/src/polyp/simple.c @@ -140,6 +140,7 @@ pa_simple* pa_simple_new( const char *dev, const char *stream_name, const pa_sample_spec *ss, + const pa_channel_map *map, const pa_buffer_attr *attr, int *rerror) { @@ -150,6 +151,7 @@ pa_simple* pa_simple_new( CHECK_VALIDITY_RETURN_ANY(rerror, dir == PA_STREAM_PLAYBACK || dir == PA_STREAM_RECORD, PA_ERR_INVALID, NULL); CHECK_VALIDITY_RETURN_ANY(rerror, !dev || *dev, PA_ERR_INVALID, NULL); CHECK_VALIDITY_RETURN_ANY(rerror, ss && pa_sample_spec_valid(ss), PA_ERR_INVALID, NULL); + CHECK_VALIDITY_RETURN_ANY(rerror, !map || (pa_channel_map_valid(map) && map->channels == ss->channels), PA_ERR_INVALID, NULL) p = pa_xnew(pa_simple, 1); p->context = NULL; @@ -184,7 +186,7 @@ pa_simple* pa_simple_new( goto unlock_and_fail; } - if (!(p->stream = pa_stream_new(p->context, stream_name, ss, NULL))) { + if (!(p->stream = pa_stream_new(p->context, stream_name, ss, map))) { error = pa_context_errno(p->context); goto unlock_and_fail; } -- cgit