Received: from [140.186.70.92] (port=56688 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PQTdR-0000g1-DR for qemu-devel@nongnu.org; Wed, 08 Dec 2010 18:41:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PQTdP-00008b-6Q for qemu-devel@nongnu.org; Wed, 08 Dec 2010 18:41:21 -0500 Received: from mail.serverraum.org ([78.47.150.89]:53733) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PQTdO-000085-Qn for qemu-devel@nongnu.org; Wed, 08 Dec 2010 18:41:19 -0500 From: Michael Walle Date: Thu, 9 Dec 2010 00:34:51 +0100 Message-Id: <1291851291-17542-1-git-send-email-michael@walle.cc> Subject: [Qemu-devel] [PATCH] noaudio: fix return value for read() List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Michael Walle Read should return bytes instead of samples. Signed-off-by: Michael Walle --- audio/noaudio.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/audio/noaudio.c b/audio/noaudio.c index 4925234..8015858 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, ...) -- 1.7.2.3