mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
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>
This commit is contained in:
parent
0f136d9e06
commit
00e076795f
13 changed files with 52 additions and 55 deletions
|
@ -195,7 +195,7 @@ static void *qpa_thread_in (void *arg)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
hw->conv (hw->conv_buf + wpos, buf, chunk, &nominal_volume);
|
||||
hw->conv (hw->conv_buf + wpos, buf, chunk);
|
||||
wpos = (wpos + chunk) % hw->samples;
|
||||
to_grab -= chunk;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue