From 00e076795f2d6dfa0c078ff5d5ee5d77190cb4b9 Mon Sep 17 00:00:00 2001 From: Michael Walle Date: Wed, 5 Jan 2011 01:05:47 +0100 Subject: audio: split sample conversion and volume mixing Refactor the volume mixing, so it can be reused for capturing devices. Additionally, it removes superfluous multiplications with the nominal volume within the hardware voice code path. Signed-off-by: Michael Walle Signed-off-by: malc --- audio/spiceaudio.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'audio/spiceaudio.c') diff --git a/audio/spiceaudio.c b/audio/spiceaudio.c index 373e4c43ed..a5c0d6bc66 100644 --- a/audio/spiceaudio.c +++ b/audio/spiceaudio.c @@ -268,11 +268,10 @@ static int line_in_run (HWVoiceIn *hw) len[1] = 0; } - hw->conv (hw->conv_buf + hw->wpos, samples, len[0], &nominal_volume); + hw->conv (hw->conv_buf + hw->wpos, samples, len[0]); if (len[1]) { - hw->conv (hw->conv_buf, samples + len[0], len[1], - &nominal_volume); + hw->conv (hw->conv_buf, samples + len[0], len[1]); } hw->wpos = (hw->wpos + num_samples) % hw->samples; -- cgit v1.2.3