copy latency flags from sink to monitor source

This commit is contained in:
Lennart Poettering 2009-03-25 16:30:28 +01:00
parent 4edb109239
commit 2c1eaa7593

View file

@ -260,7 +260,7 @@ pa_sink* pa_sink_new(
pa_proplist_setf(source_data.proplist, PA_PROP_DEVICE_DESCRIPTION, "Monitor of %s", dn ? dn : s->name);
pa_proplist_sets(source_data.proplist, PA_PROP_DEVICE_CLASS, "monitor");
s->monitor_source = pa_source_new(core, &source_data, PA_SOURCE_LATENCY);
s->monitor_source = pa_source_new(core, &source_data, 0);
pa_source_new_data_done(&source_data);
@ -360,6 +360,12 @@ void pa_sink_put(pa_sink* s) {
if (s->flags & PA_SINK_DECIBEL_VOLUME)
s->flags |= PA_SINK_FLAT_VOLUME;
if (s->flags & PA_SINK_LATENCY)
s->monitor_source->flags |= PA_SOURCE_LATENCY;
if (s->flags & PA_SINK_DYNAMIC_LATENCY)
s->monitor_source->flags |= PA_SOURCE_DYNAMIC_LATENCY;
pa_assert_se(sink_set_state(s, PA_SINK_IDLE) == 0);
pa_source_put(s->monitor_source);