On Mon, 5 Dec 2022 at 09:53, Heinrich Schuchardt <heinrich.schucha...@canonical.com> wrote: > > In the callback function we have to use memcpy(). Otherwise we add > the new samples on top of what is stored in the stream buffer. > > If we don't have enough data, zero out the rest of the stream buffer. > > Our sampling frequency is 48000. Let the batch size for the callback > function be 960. If we play a multiple of 20 ms, this will always be > a full batch. > > Signed-off-by: Heinrich Schuchardt <heinrich.schucha...@canonical.com> > --- > arch/sandbox/cpu/sdl.c | 11 +++++------ > 1 file changed, 5 insertions(+), 6 deletions(-) >
Reviewed-by: Simon Glass <s...@chromium.org>