winealsa: Remove an unnecessary check on the session channel count.

This must always be at least equal to any given stream's channels.

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Huw Davies 2022-02-18 08:29:28 +00:00 committed by Alexandre Julliard
parent f608d78910
commit 8130371614
1 changed files with 1 additions and 3 deletions

View File

@ -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 */