]> code.delx.au - pulseaudio/commitdiff
protocol-native: use the right samplerate
authorWim Taymans <wim.taymans@collabora.co.uk>
Thu, 23 Jul 2009 11:40:23 +0000 (13:40 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 23 Jul 2009 11:57:42 +0000 (13:57 +0200)
The render_memblockq is expressed in the sample_spec of the sink, not of the
particular stream before resampling.

src/pulsecore/protocol-native.c

index 96184bd28453293a85a4e14c71d98057d77f5639..9a37c565ed1bd64dba1f837397ce0388e694b351 100644 (file)
@@ -2550,7 +2550,7 @@ static void command_get_playback_latency(pa_pdispatch *pd, uint32_t command, uin
     reply = reply_new(tag);
     pa_tagstruct_put_usec(reply,
                           s->current_sink_latency +
-                          pa_bytes_to_usec(s->render_memblockq_length, &s->sink_input->sample_spec));
+                          pa_bytes_to_usec(s->render_memblockq_length, &s->sink_input->sink->sample_spec));
     pa_tagstruct_put_usec(reply, 0);
     pa_tagstruct_put_boolean(reply,
                              s->playing_for > 0 &&