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:
Michael Walle 2011-01-05 01:05:47 +01:00 committed by malc
parent 0f136d9e06
commit 00e076795f
13 changed files with 52 additions and 55 deletions

View file

@ -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;
}