LADI
/
spa
1
Fork 0

jack: align sample rate callbacks with buffersize callbacks

Don't emit when no value has been queried before.
This commit is contained in:
Wim Taymans 2023-05-18 09:46:40 +02:00
parent bd225b14bb
commit 4206f6bbdb
1 changed files with 3 additions and 3 deletions

View File

@ -1597,11 +1597,10 @@ static inline int check_sample_rate(struct client *c, struct spa_io_position *po
if (SPA_UNLIKELY(sample_rate != c->sample_rate)) {
pw_log_info("%p: sample_rate old:%d new:%d cb:%p", c,
c->sample_rate, sample_rate, c->srate_callback);
if (c->srate_callback != NULL) {
if (c->sample_rate != (uint32_t)-1)
queue_notify(c, NOTIFY_TYPE_SAMPLE_RATE, NULL, sample_rate, NULL);
} else {
else
c->sample_rate = sample_rate;
}
}
return c->sample_rate == sample_rate;
}
@ -4539,6 +4538,7 @@ jack_nframes_t jack_get_sample_rate (jack_client_t *client)
res = c->position->clock.rate.denom;
}
}
c->sample_rate = res;
pw_log_debug("sample_rate: %u", res);
return res;
}