diff options
author | Lennart Poettering <lennart@poettering.net> | 2009-09-10 02:15:12 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2009-09-10 02:15:12 +0200 |
commit | 807f2a9923572a8d88e10672d0cb5886688bb9ff (patch) | |
tree | f3be03a2a16ba218d30d4a45ba1d927d4e8ab814 | |
parent | b04320770909d36591ba74c18a40c4495178b414 (diff) |
native: send PA_COMMAND_PLAYBACK_BUFFER_ATTR_CHANGED messages only to clients that understand it
-rw-r--r-- | src/pulsecore/protocol-native.c | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/src/pulsecore/protocol-native.c b/src/pulsecore/protocol-native.c index 17aee4b1..d06dd4eb 100644 --- a/src/pulsecore/protocol-native.c +++ b/src/pulsecore/protocol-native.c @@ -826,24 +826,26 @@ static int playback_stream_process_msg(pa_msgobject *o, int code, void*userdata, pa_pstream_send_simple_ack(s->connection->pstream, PA_PTR_TO_UINT(userdata)); break; - case PLAYBACK_STREAM_MESSAGE_UPDATE_TLENGTH: { - pa_tagstruct *t; + case PLAYBACK_STREAM_MESSAGE_UPDATE_TLENGTH: s->buffer_attr.tlength = (uint32_t) offset; - t = pa_tagstruct_new(NULL, 0); - pa_tagstruct_putu32(t, PA_COMMAND_PLAYBACK_BUFFER_ATTR_CHANGED); - pa_tagstruct_putu32(t, (uint32_t) -1); /* tag */ - pa_tagstruct_putu32(t, s->index); - pa_tagstruct_putu32(t, s->buffer_attr.maxlength); - 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_usec(t, s->configured_sink_latency); - pa_pstream_send_tagstruct(s->connection->pstream, t); + if (s->connection->version >= 15) { + pa_tagstruct *t; + + t = pa_tagstruct_new(NULL, 0); + pa_tagstruct_putu32(t, PA_COMMAND_PLAYBACK_BUFFER_ATTR_CHANGED); + pa_tagstruct_putu32(t, (uint32_t) -1); /* tag */ + pa_tagstruct_putu32(t, s->index); + pa_tagstruct_putu32(t, s->buffer_attr.maxlength); + 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_usec(t, s->configured_sink_latency); + pa_pstream_send_tagstruct(s->connection->pstream, t); + } break; - } } return 0; |