if (s->early_requests) {
/* In early request mode we need to emulate the classic
- * fragment-based playback model. We do this setting the source
- * latency to the fragment size. */
+ * fragment-based playback model. Unfortunately we have no
+ * mechanism to tell the source how often we want it to send us
+ * data. The next best thing we can do is to set the source's
+ * total buffer (i.e. its latency) to the fragment size. That
+ * way it will have to send data at least that often. */
source_usec = fragsize_usec;
if (s->early_requests) {
- /* Ok, we didn't necessarily get what we were asking for, so
- * let's tell the user */
+ /* Ok, we didn't necessarily get what we were asking for. We
+ * might still get the proper fragment interval, we just can't
+ * guarantee it. */
- fragsize_usec = s->configured_source_latency;
+ if (fragsize_usec != s->configured_source_latency)
+ pa_log_debug("Could not configure a sufficiently low latency. Early requests might not be satisifed.");
} else if (s->adjust_latency) {
if (s->early_requests) {
/* In early request mode we need to emulate the classic
- * fragment-based playback model. We do this setting the sink
- * latency to the fragment size. */
+ * fragment-based playback model. Unfortunately we have no
+ * mechanism to tell the sink how often we want to be queried
+ * for data. The next best thing we can do is to set the sink's
+ * total buffer (i.e. its latency) to the fragment size. That
+ * way it will have to query us at least that often. */
sink_usec = minreq_usec;
pa_log_debug("Early requests mode enabled, configuring sink latency to minreq.");
if (s->early_requests) {
- /* Ok, we didn't necessarily get what we were asking for, so
- * let's tell the user */
+ /* Ok, we didn't necessarily get what we were asking for. We
+ * might still get the proper fragment interval, we just can't
+ * guarantee it. */
- minreq_usec = s->configured_sink_latency;
+ if (minreq_usec != s->configured_sink_latency)
+ pa_log_debug("Could not configure a sufficiently low latency. Early requests might not be satisifed.");
} else if (s->adjust_latency) {
pa_tagstruct_puts(t, pa_resample_method_to_string(pa_sink_input_get_resample_method(s)));
pa_tagstruct_puts(t, s->driver);
if (c->version >= 11)
- pa_tagstruct_put_boolean(t, pa_sink_input_get_mute(s));
+ pa_tagstruct_put_boolean(t, s->muted);
if (c->version >= 13)
pa_tagstruct_put_proplist(t, s->proplist);
if (c->version >= 19)
pa_tagstruct_put_boolean(t, (pa_source_output_get_state(s) == PA_SOURCE_OUTPUT_CORKED));
if (c->version >= 22) {
pa_tagstruct_put_cvolume(t, &v);
- pa_tagstruct_put_boolean(t, pa_source_output_get_mute(s));
+ pa_tagstruct_put_boolean(t, s->muted);
pa_tagstruct_put_boolean(t, has_volume);
pa_tagstruct_put_boolean(t, s->volume_writable);
pa_tagstruct_put_format_info(t, s->format);