mirror of
https://git.proxmox.com/git/qemu
synced 2025-08-15 02:39:19 +00:00
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>
This commit is contained in:
parent
138b38b61b
commit
85882c71a9
@ -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 total = sw->hw->total_samples_captured - sw->total_hw_samples_acquired;
|
||||||
int to_clear = audio_MIN (samples, total);
|
int to_clear = audio_MIN (samples, total);
|
||||||
audio_pcm_info_clear_buf (&sw->info, buf, to_clear);
|
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, ...)
|
static int no_ctl_in (HWVoiceIn *hw, int cmd, ...)
|
||||||
|
Loading…
Reference in New Issue
Block a user