Revert "audio: fix wavcapture segfault"

This reverts commit cbaf25d1f5.

Since previous commit every audio backend has a pcm_ops function
table. It's no longer necessary to test if the table is available.

Signed-off-by: Volker Rümelin <vr_qemu@t-online.de>
Message-Id: <20220301191311.26695-9-vr_qemu@t-online.de>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
Volker Rümelin 2022-03-01 20:13:05 +01:00 committed by Gerd Hoffmann
parent 33940dd336
commit 669b95229d

View File

@ -612,7 +612,7 @@ static size_t audio_pcm_sw_read(SWVoiceIn *sw, void *buf, size_t size)
total += isamp; total += isamp;
} }
if (hw->pcm_ops && !hw->pcm_ops->volume_in) { if (!hw->pcm_ops->volume_in) {
mixeng_volume (sw->buf, ret, &sw->vol); mixeng_volume (sw->buf, ret, &sw->vol);
} }
@ -718,7 +718,7 @@ static size_t audio_pcm_sw_write(SWVoiceOut *sw, void *buf, size_t size)
if (swlim) { if (swlim) {
sw->conv (sw->buf, buf, swlim); sw->conv (sw->buf, buf, swlim);
if (sw->hw->pcm_ops && !sw->hw->pcm_ops->volume_out) { if (!sw->hw->pcm_ops->volume_out) {
mixeng_volume (sw->buf, swlim, &sw->vol); mixeng_volume (sw->buf, swlim, &sw->vol);
} }
} }