summaryrefslogtreecommitdiffstats
path: root/polyp/polyplib-stream.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2006-01-28 01:07:09 +0000
committerLennart Poettering <lennart@poettering.net>2006-01-28 01:07:09 +0000
commitdb6dc13e683fbcdb40498f7d1e1e83eba520ac4d (patch)
tree7fade5a43a57c6030bb1bafc7e4f3cb314a93fa4 /polyp/polyplib-stream.c
parent8580967062c79d49c35a24052f682533d1baa461 (diff)
* add variadic function pa_tagstruct_get() and pa_tagstruct_put() for parsing/constructing tagstruct records
* convert some of the tagstruct uses to this new API git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@466 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'polyp/polyplib-stream.c')
-rw-r--r--polyp/polyplib-stream.c29
1 files changed, 17 insertions, 12 deletions
diff --git a/polyp/polyplib-stream.c b/polyp/polyplib-stream.c
index 51ee6a22..7b9d6863 100644
--- a/polyp/polyplib-stream.c
+++ b/polyp/polyplib-stream.c
@@ -317,20 +317,25 @@ static void create_stream(pa_stream *s, const char *dev, const pa_buffer_attr *a
dev = s->context->conf->default_source;
}
- pa_tagstruct_putu32(t, s->direction == PA_STREAM_PLAYBACK ? PA_COMMAND_CREATE_PLAYBACK_STREAM : PA_COMMAND_CREATE_RECORD_STREAM);
- pa_tagstruct_putu32(t, tag = s->context->ctag++);
- pa_tagstruct_puts(t, s->name);
- pa_tagstruct_put_sample_spec(t, &s->sample_spec);
- pa_tagstruct_put_channel_map(t, &s->channel_map);
- pa_tagstruct_putu32(t, PA_INVALID_INDEX);
- pa_tagstruct_puts(t, dev);
- pa_tagstruct_putu32(t, s->buffer_attr.maxlength);
- pa_tagstruct_put_boolean(t, !!(flags & PA_STREAM_START_CORKED));
+ pa_tagstruct_put(t,
+ PA_TAG_U32, s->direction == PA_STREAM_PLAYBACK ? PA_COMMAND_CREATE_PLAYBACK_STREAM : PA_COMMAND_CREATE_RECORD_STREAM,
+ PA_TAG_U32, tag = s->context->ctag++,
+ PA_TAG_STRING, s->name,
+ PA_TAG_SAMPLE_SPEC, &s->sample_spec,
+ PA_TAG_CHANNEL_MAP, &s->channel_map,
+ PA_TAG_U32, PA_INVALID_INDEX,
+ PA_TAG_STRING, dev,
+ PA_TAG_U32, s->buffer_attr.maxlength,
+ PA_TAG_BOOLEAN, !!(flags & PA_STREAM_START_CORKED),
+ PA_TAG_INVALID);
+
if (s->direction == PA_STREAM_PLAYBACK) {
pa_cvolume cv;
- pa_tagstruct_putu32(t, s->buffer_attr.tlength);
- pa_tagstruct_putu32(t, s->buffer_attr.prebuf);
- pa_tagstruct_putu32(t, s->buffer_attr.minreq);
+ pa_tagstruct_put(t,
+ PA_TAG_U32, s->buffer_attr.tlength,
+ PA_TAG_U32, s->buffer_attr.prebuf,
+ PA_TAG_U32, s->buffer_attr.minreq,
+ PA_TAG_INVALID);
if (!volume) {
pa_cvolume_reset(&cv, s->sample_spec.channels);