summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTanu Kaskinen <tanu.kaskinen@linux.intel.com>2013-12-17 21:22:50 +0200
committerTanu Kaskinen <tanu.kaskinen@linux.intel.com>2014-01-08 21:26:40 +0200
commitd27a650cd5b30fecaa794e6e485dc557881de83e (patch)
tree86cff2cb20e97ddc992acfe59870dd79f29376a8
parent6cdb569b8332c4453603ab09eec4ad0cf1c28e33 (diff)
stream: Remove a volume channel validity check
The check is done for clients that use pa_stream_new() but not for clients that use pa_stream_new_extended(). This is inconsistent. We could check that the volume channels match the channels set in the format info struct that is passed to pa_stream_new_extended(), but that doesn't work if the format info doesn't contain the channel information (that can happen if the client wants the server to choose the channel count for the stream). And it should also be possible to pass a mono volume for a multi-channel stream. The check could be extended to handle all these cases, but I don't see much point in wasting time on that. The server will anyway validate the stream parameters, it's not particularly important to fail already when the stream is being created at the client side.
-rw-r--r--src/pulse/stream.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/pulse/stream.c b/src/pulse/stream.c
index d3763260..8e35c295 100644
--- a/src/pulse/stream.c
+++ b/src/pulse/stream.c
@@ -1224,7 +1224,6 @@ static int create_stream(
* client development easier */
PA_CHECK_VALIDITY(s->context, direction == PA_STREAM_RECORD || !(flags & (PA_STREAM_PEAK_DETECT)), PA_ERR_INVALID);
- PA_CHECK_VALIDITY(s->context, !volume || s->n_formats || (pa_sample_spec_valid(&s->sample_spec) && volume->channels == s->sample_spec.channels), PA_ERR_INVALID);
PA_CHECK_VALIDITY(s->context, !sync_stream || (direction == PA_STREAM_PLAYBACK && sync_stream->direction == PA_STREAM_PLAYBACK), PA_ERR_INVALID);
PA_CHECK_VALIDITY(s->context, (flags & (PA_STREAM_ADJUST_LATENCY|PA_STREAM_EARLY_REQUESTS)) != (PA_STREAM_ADJUST_LATENCY|PA_STREAM_EARLY_REQUESTS), PA_ERR_INVALID);