summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Walle <michael@walle.cc>2010-12-09 00:34:51 +0100
committermalc <av1474@comtv.ru>2010-12-10 05:25:35 +0300
commit85882c71a946796c0ddc87dc84cc6fcb05b375c7 (patch)
tree0d4c596f07fa4519f1a2687fa957db1146b6fa51
parent138b38b61bf92d4e9588acf934e532499c94e185 (diff)
downloadqemu-85882c71a946796c0ddc87dc84cc6fcb05b375c7.tar.gz
qemu-85882c71a946796c0ddc87dc84cc6fcb05b375c7.tar.bz2
qemu-85882c71a946796c0ddc87dc84cc6fcb05b375c7.zip
noaudio: fix return value for read()
Read should return bytes instead of samples. Signed-off-by: Michael Walle <michael@walle.cc> Signed-off-by: malc <av1474@comtv.ru>
-rw-r--r--audio/noaudio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/audio/noaudio.c b/audio/noaudio.c
index 4925234c07..80158583b2 100644
--- a/audio/noaudio.c
+++ b/audio/noaudio.c
@@ -121,7 +121,7 @@ static int no_read (SWVoiceIn *sw, void *buf, int size)
int total = sw->hw->total_samples_captured - sw->total_hw_samples_acquired;
int to_clear = audio_MIN (samples, total);
audio_pcm_info_clear_buf (&sw->info, buf, to_clear);
- return to_clear;
+ return to_clear << sw->info.shift;
}
static int no_ctl_in (HWVoiceIn *hw, int cmd, ...)