spa: make a new FREEWHEEL clock flag

When freewheeling, the clock is going faster than real time.
When freewheeling, skip samples in alsa sink/source.
This commit is contained in:
Wim Taymans 2021-05-06 18:14:07 +02:00
parent fab199d5b9
commit efc497a38a
6 changed files with 22 additions and 2 deletions

View file

@ -864,6 +864,7 @@ static void check_properties(struct pw_impl_node *node)
if (strcmp(str, node->group) != 0) {
pw_log_info(NAME" %p: group '%s'->'%s'", node, node->group, str);
snprintf(node->group, sizeof(node->group), "%s", str);
node->freewheel = strcmp(node->group, "pipewire.freewheel") == 0;
recalc_reason = "group changed";
}

View file

@ -636,6 +636,7 @@ struct pw_impl_node {
unsigned int visited:1; /**< for sorting */
unsigned int want_driver:1; /**< this node wants to be assigned to a driver */
unsigned int passive:1; /**< driver graph only has passive links */
unsigned int freewheel:1; /**< if this is the freewheel driver */
uint32_t port_user_data_size; /**< extra size for port user data */