noaudio: fix return value for read()
authorMichael Walle <michael@walle.cc>
Wed, 8 Dec 2010 23:34:51 +0000 (00:34 +0100)
committermalc <av1474@comtv.ru>
Fri, 10 Dec 2010 02:25:35 +0000 (05:25 +0300)
Read should return bytes instead of samples.

Signed-off-by: Michael Walle <michael@walle.cc>
Signed-off-by: malc <av1474@comtv.ru>
audio/noaudio.c

index 4925234..8015858 100644 (file)
@@ -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, ...)