mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-04 13:29:59 -05:00
initialize selem index
This commit is contained in:
parent
194d8991d7
commit
504384a041
1 changed files with 2 additions and 1 deletions
|
|
@ -1027,6 +1027,7 @@ snd_mixer_elem_t *pa_alsa_find_elem(snd_mixer_t *mixer, const char *name, const
|
||||||
pa_assert(name);
|
pa_assert(name);
|
||||||
|
|
||||||
snd_mixer_selem_id_set_name(sid, name);
|
snd_mixer_selem_id_set_name(sid, name);
|
||||||
|
snd_mixer_selem_id_set_index(sid, 0);
|
||||||
|
|
||||||
if ((elem = snd_mixer_find_selem(mixer, sid))) {
|
if ((elem = snd_mixer_find_selem(mixer, sid))) {
|
||||||
|
|
||||||
|
|
@ -1043,6 +1044,7 @@ snd_mixer_elem_t *pa_alsa_find_elem(snd_mixer_t *mixer, const char *name, const
|
||||||
|
|
||||||
if (fallback) {
|
if (fallback) {
|
||||||
snd_mixer_selem_id_set_name(sid, fallback);
|
snd_mixer_selem_id_set_name(sid, fallback);
|
||||||
|
snd_mixer_selem_id_set_index(sid, 0);
|
||||||
|
|
||||||
if ((fallback_elem = snd_mixer_find_selem(mixer, sid))) {
|
if ((fallback_elem = snd_mixer_find_selem(mixer, sid))) {
|
||||||
|
|
||||||
|
|
@ -1085,7 +1087,6 @@ success:
|
||||||
return elem;
|
return elem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int pa_alsa_find_mixer_and_elem(
|
int pa_alsa_find_mixer_and_elem(
|
||||||
snd_pcm_t *pcm,
|
snd_pcm_t *pcm,
|
||||||
snd_mixer_t **_m,
|
snd_mixer_t **_m,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue