Brendan Shanks (@bshanks) commented about dlls/winecoreaudio.drv/coreaudio.c:
- }; - - sc = AudioObjectSetPropertyData(stream->dev_id, &prop_addr, 0, NULL, sizeof(float), &level); - if (sc == noErr) - level = 1.0f; - else - WARN("Couldn't set master volume, applying it directly to the channels: %x\n", (int)sc);
- for (i = 1; i <= stream->fmt->nChannels; ++i) { - const float vol = level * params->session_volumes[i - 1] * params->volumes[i - 1]; + WARN("CoreAudio doesn't support per-channel volume control\n");
- prop_addr.mElement = i; + for(i = 0; i < stream->fmt->nChannels; ++i){ + tmp = params->master_volume * params->volumes[i] * params->session_volumes[i]; + level = tmp < level ? tmp : level; I think this could be replaced by `fminf()`
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/7920#note_104156