Skip to contentSkip to conversation

noaudio: fix return value for read()

PATCH Applied Michael Walle 2 participants 2 messages Dec 8, 2010 – Dec 10, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 noaudio: fix return value for read()

Read should return bytes instead of samples.

---
 audio/noaudio.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
audio/noaudio.c +1 -1
index 4925234..8015858 100644
@@ -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, ...)
Signature · 1 line
1.7.2.3
Applied
#1 lore raw
Quoted 1 line · Michael Walle

Read should return bytes instead of samples.

Thanks, applied.

[..snip..]

Signature · 1 line
mailto:[email protected]