mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-01 22:58:50 -04:00
parent
ceb1c38ee9
commit
79ee2fac73
1 changed files with 18 additions and 0 deletions
|
|
@ -1412,6 +1412,23 @@ char *pa_alsa_get_reserve_name(const char *device) {
|
||||||
return pa_sprintf_malloc("Audio%i", i);
|
return pa_sprintf_malloc("Audio%i", i);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void dump_supported_rates(unsigned int* values)
|
||||||
|
{
|
||||||
|
pa_strbuf *buf;
|
||||||
|
char *str;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
buf = pa_strbuf_new();
|
||||||
|
|
||||||
|
for (i = 0; values[i]; i++) {
|
||||||
|
pa_strbuf_printf(buf, " %u", values[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
str = pa_strbuf_to_string_free(buf);
|
||||||
|
pa_log_debug("Supported rates:%s", str);
|
||||||
|
pa_xfree(str);
|
||||||
|
}
|
||||||
|
|
||||||
unsigned int *pa_alsa_get_supported_rates(snd_pcm_t *pcm, unsigned int fallback_rate) {
|
unsigned int *pa_alsa_get_supported_rates(snd_pcm_t *pcm, unsigned int fallback_rate) {
|
||||||
static unsigned int all_rates[] = { 8000, 11025, 12000,
|
static unsigned int all_rates[] = { 8000, 11025, 12000,
|
||||||
16000, 22050, 24000,
|
16000, 22050, 24000,
|
||||||
|
|
@ -1461,6 +1478,7 @@ unsigned int *pa_alsa_get_supported_rates(snd_pcm_t *pcm, unsigned int fallback_
|
||||||
rates[1] = 0;
|
rates[1] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dump_supported_rates(rates);
|
||||||
return rates;
|
return rates;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue