On 2007-09-25 12:28, Angus wrote:
> Hello
>
> I am writing a sampling type program which takes a buffer, and picks
> the middle of the buffer. But I need to take a bit out the middle and
> then take what is left (on both sides) and take the middle out of
> these fragments.
>
> I have a function which takes a range, eg start, end and a samplesize
> and calculates the range of the buffer to take for sampling. But of
> course each time I call this function it creates two new start-end
> ranges to again get the middle bit again. I have a size of sample so
> when the middle bits reach the sample size I just stop.
>
> How would I write something to achieve this? Should it be a recursive
> function?
Recursive is probably a good idea. However for these kinds of questions
please consult comp.programming instead.
--
Erik Wikström