mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-21 08:56:56 -05:00
pulse-server: implement volume on sink/source
This commit is contained in:
parent
5862ce606c
commit
4d42a83fb9
2 changed files with 185 additions and 65 deletions
|
|
@ -107,6 +107,21 @@ struct selector {
|
|||
struct pw_manager_object *best;
|
||||
};
|
||||
|
||||
static void select_best(struct selector *s, struct pw_manager_object *o)
|
||||
{
|
||||
const char *str;
|
||||
int32_t prio = 0;
|
||||
|
||||
if (o->props &&
|
||||
(str = pw_properties_get(o->props, PW_KEY_PRIORITY_DRIVER)) != NULL) {
|
||||
prio = pw_properties_parse_int(str);
|
||||
if (prio > s->score) {
|
||||
s->best = o;
|
||||
s->score = prio;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static struct pw_manager_object *select_object(struct pw_manager *m,
|
||||
struct selector *s)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue