@@ -649,7 +649,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);
}
@@ -743,7 +743,7 @@ static size_t audio_pcm_sw_write(SWVoiceOut *sw, void *buf, size_t size)
if (samples) {
sw->conv(sw->buf, buf, samples);
- if (sw->hw->pcm_ops && !sw->hw->pcm_ops->volume_out) {
+ if (!sw->hw->pcm_ops->volume_out) {
mixeng_volume(sw->buf, samples, &sw->vol);
}
}
With previous commit every audio backend has a pcm_ops function table. It's no longer necessary to test if the table is available. This reverts commit cbaf25d1f5: "audio: fix wavcapture segfault" Signed-off-by: Volker RĂ¼melin <vr_qemu@t-online.de> --- audio/audio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)