From: Michael Walle Date: Wed, 8 Dec 2010 23:34:51 +0000 (+0100) Subject: noaudio: fix return value for read() X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=85882c71a946796c0ddc87dc84cc6fcb05b375c7;p=qemu-xen-4.1-testing.git noaudio: fix return value for read() Read should return bytes instead of samples. Signed-off-by: Michael Walle Signed-off-by: malc --- diff --git a/audio/noaudio.c b/audio/noaudio.c index 4925234c0..80158583b 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, ...)