mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-06 13:29:56 -05:00
dbus: Fix device latency querying.
This commit is contained in:
parent
b7fab75fdd
commit
bce720c85d
1 changed files with 7 additions and 3 deletions
|
|
@ -598,13 +598,17 @@ static void handle_get_latency(DBusConnection *conn, DBusMessage *msg, void *use
|
|||
pa_assert(msg);
|
||||
pa_assert(d);
|
||||
|
||||
if (d->type == PA_DEVICE_TYPE_SINK && !(d->sink->flags & PA_SINK_LATENCY))
|
||||
if (d->type == PA_DEVICE_TYPE_SINK && !(d->sink->flags & PA_SINK_LATENCY)) {
|
||||
pa_dbus_send_error(conn, msg, PA_DBUS_ERROR_NO_SUCH_PROPERTY,
|
||||
"Sink %s doesn't support latency querying.", d->sink->name);
|
||||
else if (d->type == PA_DEVICE_TYPE_SOURCE && !(d->source->flags & PA_SOURCE_LATENCY))
|
||||
return;
|
||||
}
|
||||
|
||||
if (d->type == PA_DEVICE_TYPE_SOURCE && !(d->source->flags & PA_SOURCE_LATENCY)) {
|
||||
pa_dbus_send_error(conn, msg, PA_DBUS_ERROR_NO_SUCH_PROPERTY,
|
||||
"Source %s doesn't support latency querying.", d->source->name);
|
||||
return;
|
||||
return;
|
||||
}
|
||||
|
||||
latency = (d->type == PA_DEVICE_TYPE_SINK) ? pa_sink_get_latency(d->sink) : pa_source_get_latency(d->source);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue