diff options
author | Michael Walle <michael@walle.cc> | 2011-01-05 01:05:47 +0100 |
---|---|---|
committer | malc <av1474@comtv.ru> | 2011-01-12 18:36:22 +0300 |
commit | 00e076795f2d6dfa0c078ff5d5ee5d77190cb4b9 (patch) | |
tree | 125088eea53cc55083a5b69e927937b89db22645 /audio/spiceaudio.c | |
parent | 0f136d9e060ad879d0b840274ddfd1955e24fc10 (diff) | |
download | qemu-00e076795f2d6dfa0c078ff5d5ee5d77190cb4b9.tar.gz qemu-00e076795f2d6dfa0c078ff5d5ee5d77190cb4b9.tar.bz2 qemu-00e076795f2d6dfa0c078ff5d5ee5d77190cb4b9.zip |
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 <michael@walle.cc>
Signed-off-by: malc <av1474@comtv.ru>
Diffstat (limited to 'audio/spiceaudio.c')
-rw-r--r-- | audio/spiceaudio.c | 5 |
1 files changed, 2 insertions, 3 deletions
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; |