mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-31 22:25:38 -04:00
alsa: relax the max latency requiremen
Our max latency is based on the buffer_size / 2, one part is playing and another part is filling.
This commit is contained in:
parent
c40f2ac245
commit
50ce9a794f
2 changed files with 2 additions and 2 deletions
|
|
@ -68,7 +68,7 @@ static void emit_node_info(struct state *this, bool full)
|
|||
items[n_items++] = SPA_DICT_ITEM_INIT(SPA_KEY_MEDIA_CLASS, "Audio/Sink");
|
||||
items[n_items++] = SPA_DICT_ITEM_INIT(SPA_KEY_NODE_DRIVER, "true");
|
||||
if (this->have_format) {
|
||||
snprintf(latency, sizeof(latency), "%lu/%d", this->buffer_frames / 4, this->rate);
|
||||
snprintf(latency, sizeof(latency), "%lu/%d", this->buffer_frames / 2, this->rate);
|
||||
items[n_items++] = SPA_DICT_ITEM_INIT(SPA_KEY_NODE_MAX_LATENCY, latency);
|
||||
}
|
||||
this->info.props = &SPA_DICT_INIT(items, n_items);
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ static void emit_node_info(struct state *this, bool full)
|
|||
items[n_items++] = SPA_DICT_ITEM_INIT(SPA_KEY_MEDIA_CLASS, "Audio/Source");
|
||||
items[n_items++] = SPA_DICT_ITEM_INIT(SPA_KEY_NODE_DRIVER, "true");
|
||||
if (this->have_format) {
|
||||
snprintf(latency, sizeof(latency), "%lu/%d", this->buffer_frames / 4, this->rate);
|
||||
snprintf(latency, sizeof(latency), "%lu/%d", this->buffer_frames / 2, this->rate);
|
||||
items[n_items++] = SPA_DICT_ITEM_INIT(SPA_KEY_NODE_MAX_LATENCY, latency);
|
||||
}
|
||||
this->info.props = &SPA_DICT_INIT(items, n_items);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue