mixer/Control: use Mixer::IsGlobal()

This commit is contained in:
Max Kellermann 2022-08-18 14:33:19 +02:00
parent 5c4743441e
commit 2b8f1170a6
1 changed files with 3 additions and 3 deletions

View File

@ -92,7 +92,7 @@ mixer_close(Mixer *mixer)
void
mixer_auto_close(Mixer *mixer)
{
if (!mixer->plugin.global)
if (!mixer->IsGlobal())
mixer_close(mixer);
}
@ -103,7 +103,7 @@ mixer_get_volume(Mixer *mixer)
assert(mixer != nullptr);
if (mixer->plugin.global && !mixer->failure)
if (mixer->IsGlobal() && !mixer->failure)
mixer_open(mixer);
const std::scoped_lock<Mutex> protect(mixer->mutex);
@ -128,7 +128,7 @@ mixer_set_volume(Mixer *mixer, unsigned volume)
assert(mixer != nullptr);
assert(volume <= 100);
if (mixer->plugin.global && !mixer->failure)
if (mixer->IsGlobal() && !mixer->failure)
mixer_open(mixer);
const std::scoped_lock<Mutex> protect(mixer->mutex);