summaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
authorVolker RĂ¼melin2022-03-01 20:13:05 +0100
committerGerd Hoffmann2022-03-04 11:05:13 +0100
commit669b95229d13e3c521c2f50bcc9ca0503efb3c5f (patch)
treec20aa4399c84b39bad1e716d186ba387c03f1d84 /audio
parentaudio: add pcm_ops function table for capture backend (diff)
downloadqemu-669b95229d13e3c521c2f50bcc9ca0503efb3c5f.tar.gz
qemu-669b95229d13e3c521c2f50bcc9ca0503efb3c5f.tar.xz
qemu-669b95229d13e3c521c2f50bcc9ca0503efb3c5f.zip
Revert "audio: fix wavcapture segfault"
This reverts commit cbaf25d1f59ee13fc7542a06ea70784f2e000c04. 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>
Diffstat (limited to 'audio')
-rw-r--r--audio/audio.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/audio/audio.c b/audio/audio.c
index 55f885f8e9..c420a8bd1c 100644
--- a/audio/audio.c
+++ b/audio/audio.c
@@ -612,7 +612,7 @@ static size_t audio_pcm_sw_read(SWVoiceIn *sw, void *buf, size_t size)
total += isamp;
}
- if (hw->pcm_ops && !hw->pcm_ops->volume_in) {
+ if (!hw->pcm_ops->volume_in) {
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) {
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);
}
}