[PATCH 2/7] winealsa: Remove an unnecessary check on the session channel count.
Andrew Eikum
aeikum at codeweavers.com
Mon Feb 21 10:29:35 CST 2022
Signed-off-by: Andrew Eikum <aeikum at codeweavers.com>
On Fri, Feb 18, 2022 at 08:29:28AM +0000, Huw Davies wrote:
> This must always be at least equal to any given stream's channels.
>
> Signed-off-by: Huw Davies <huw at codeweavers.com>
> ---
> dlls/winealsa.drv/mmdevdrv.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/dlls/winealsa.drv/mmdevdrv.c b/dlls/winealsa.drv/mmdevdrv.c
> index d1f9a1d35a4..8f198531cc0 100644
> --- a/dlls/winealsa.drv/mmdevdrv.c
> +++ b/dlls/winealsa.drv/mmdevdrv.c
> @@ -1491,13 +1491,11 @@ static void adjust_buffer_volume(const ACImpl *This, BYTE *buf, snd_pcm_uframes_
>
> /* Adjust the buffer based on the volume for each channel */
> for (i = 0; i < channels; i++)
> - vol[i] = stream->vols[i] * This->session->master_vol;
> - for (i = 0; i < min(channels, This->session->channel_count); i++)
> {
> + vol[i] = stream->vols[i] * This->session->master_vol;
> vol[i] *= This->session->channel_vols[i];
> adjust |= vol[i] != 1.0f;
> }
> - while (i < channels) adjust |= vol[i++] != 1.0f;
> if (!adjust) return;
>
> /* Skip the frames we've already adjusted before */
> --
> 2.25.1
>
>
More information about the wine-devel
mailing list