Commit 81303716 authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard

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: 's avatarHuw Davies <huw@codeweavers.com> Signed-off-by: 's avatarAndrew Eikum <aeikum@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent f608d789
...@@ -1491,13 +1491,11 @@ static void adjust_buffer_volume(const ACImpl *This, BYTE *buf, snd_pcm_uframes_ ...@@ -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 */ /* Adjust the buffer based on the volume for each channel */
for (i = 0; i < channels; i++) 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]; vol[i] *= This->session->channel_vols[i];
adjust |= vol[i] != 1.0f; adjust |= vol[i] != 1.0f;
} }
while (i < channels) adjust |= vol[i++] != 1.0f;
if (!adjust) return; if (!adjust) return;
/* Skip the frames we've already adjusted before */ /* Skip the frames we've already adjusted before */
......
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