Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide
translations



Rockbox mail archive

Subject: Re: buffer overflow in dsp.c when playing low-frequency stereo files

Re: buffer overflow in dsp.c when playing low-frequency stereo files

From: Magnus Holmgren <lear_at_algonet.se>
Date: Wed, 10 Aug 2005 17:24:49 +0200

Frederic Devernay wrote:

> In fact, I could rewrite dsp_input_size() so that it gives the _exact_
> input buffer size, using the pre-computed delta used for upsampling AND
> downsampling. Of course, I made sure there's no yield() between this and
> dsp_process(), so that the value cannot change.

You are aware that the number of bytes written by dsp_process varies a
little, depending on how the delta "moves" within the current chunk of
data (i.e., the value of phase when dsp_process is called)? So you
should return a maximum input size...

   Magnus
_______________________________________________
http://cool.haxx.se/mailman/listinfo/rockbox
Received on 2005-08-10

Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy