Commit 3be18507 authored by Max Kellermann's avatar Max Kellermann

alsa_mixer: initialize "volume_set" in the open() method

"volume_set" is an attribute which becomes undefined when the mixer is closed. That means, it must be initialized each time the mixer is opened.
parent 0c9799ba
......@@ -52,8 +52,6 @@ alsa_mixer_init(const struct config_param *param)
am->control = config_get_block_string(param, "mixer_control",
VOLUME_MIXER_ALSA_CONTROL_DEFAULT);
am->volume_set = -1;
return &am->base;
}
......@@ -82,6 +80,8 @@ alsa_mixer_open(struct mixer *data)
int err;
snd_mixer_elem_t *elem;
am->volume_set = -1;
err = snd_mixer_open(&am->handle, 0);
snd_config_update_free_global();
if (err < 0) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment