mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-03 09:01:50 -05:00
alsa-sink/source: Rename a variable for supported sample rates in userdata
It is changed from 'rates' to 'supported_rates'. Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
This commit is contained in:
parent
bee9b9481a
commit
c4efbc81b0
2 changed files with 16 additions and 16 deletions
|
|
@ -112,7 +112,7 @@ struct userdata {
|
|||
pa_cvolume hardware_volume;
|
||||
|
||||
pa_sample_format_t *supported_formats;
|
||||
unsigned int *rates;
|
||||
unsigned int *supported_rates;
|
||||
|
||||
size_t
|
||||
frame_size,
|
||||
|
|
@ -1647,14 +1647,14 @@ static bool sink_set_formats(pa_sink *s, pa_idxset *formats) {
|
|||
* framework, but this must be changed if we do. */
|
||||
|
||||
/* Count how many sample rates we support */
|
||||
for (idx = 0, n = 0; u->rates[idx]; idx++)
|
||||
for (idx = 0, n = 0; u->supported_rates[idx]; idx++)
|
||||
n++;
|
||||
|
||||
/* First insert non-PCM formats since we prefer those. */
|
||||
PA_IDXSET_FOREACH(f, formats, idx) {
|
||||
if (!pa_format_info_is_pcm(f)) {
|
||||
g = pa_format_info_copy(f);
|
||||
pa_format_info_set_prop_int_array(g, PA_PROP_FORMAT_RATE, (int *) u->rates, n);
|
||||
pa_format_info_set_prop_int_array(g, PA_PROP_FORMAT_RATE, (int *) u->supported_rates, n);
|
||||
pa_idxset_put(u->formats, g, NULL);
|
||||
}
|
||||
}
|
||||
|
|
@ -1680,8 +1680,8 @@ static int sink_reconfigure_cb(pa_sink *s, pa_sample_spec *spec, bool passthroug
|
|||
|
||||
pa_assert(u);
|
||||
|
||||
for (i = 0; u->rates[i]; i++) {
|
||||
if (u->rates[i] == spec->rate) {
|
||||
for (i = 0; u->supported_rates[i]; i++) {
|
||||
if (u->supported_rates[i] == spec->rate) {
|
||||
supported = true;
|
||||
break;
|
||||
}
|
||||
|
|
@ -2356,8 +2356,8 @@ pa_sink *pa_alsa_sink_new(pa_module *m, pa_modargs *ma, const char*driver, pa_ca
|
|||
goto fail;
|
||||
}
|
||||
|
||||
u->rates = pa_alsa_get_supported_rates(u->pcm_handle, ss.rate);
|
||||
if (!u->rates) {
|
||||
u->supported_rates = pa_alsa_get_supported_rates(u->pcm_handle, ss.rate);
|
||||
if (!u->supported_rates) {
|
||||
pa_log_error("Failed to find any supported sample rates.");
|
||||
goto fail;
|
||||
}
|
||||
|
|
@ -2639,8 +2639,8 @@ static void userdata_free(struct userdata *u) {
|
|||
if (u->supported_formats)
|
||||
pa_xfree(u->supported_formats);
|
||||
|
||||
if (u->rates)
|
||||
pa_xfree(u->rates);
|
||||
if (u->supported_rates)
|
||||
pa_xfree(u->supported_rates);
|
||||
|
||||
reserve_done(u);
|
||||
monitor_done(u);
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ struct userdata {
|
|||
pa_cvolume hardware_volume;
|
||||
|
||||
pa_sample_format_t *supported_formats;
|
||||
unsigned int *rates;
|
||||
unsigned int *supported_rates;
|
||||
|
||||
size_t
|
||||
frame_size,
|
||||
|
|
@ -1476,8 +1476,8 @@ static int source_reconfigure_cb(pa_source *s, pa_sample_spec *spec, bool passth
|
|||
|
||||
pa_assert(u);
|
||||
|
||||
for (i = 0; u->rates[i]; i++) {
|
||||
if (u->rates[i] == spec->rate) {
|
||||
for (i = 0; u->supported_rates[i]; i++) {
|
||||
if (u->supported_rates[i] == spec->rate) {
|
||||
supported = true;
|
||||
break;
|
||||
}
|
||||
|
|
@ -2032,8 +2032,8 @@ pa_source *pa_alsa_source_new(pa_module *m, pa_modargs *ma, const char*driver, p
|
|||
goto fail;
|
||||
}
|
||||
|
||||
u->rates = pa_alsa_get_supported_rates(u->pcm_handle, ss.rate);
|
||||
if (!u->rates) {
|
||||
u->supported_rates = pa_alsa_get_supported_rates(u->pcm_handle, ss.rate);
|
||||
if (!u->supported_rates) {
|
||||
pa_log_error("Failed to find any supported sample rates.");
|
||||
goto fail;
|
||||
}
|
||||
|
|
@ -2269,8 +2269,8 @@ static void userdata_free(struct userdata *u) {
|
|||
if (u->supported_formats)
|
||||
pa_xfree(u->supported_formats);
|
||||
|
||||
if (u->rates)
|
||||
pa_xfree(u->rates);
|
||||
if (u->supported_rates)
|
||||
pa_xfree(u->supported_rates);
|
||||
|
||||
reserve_done(u);
|
||||
monitor_done(u);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue