Re: [linux-audio-dev] EVO 0.0.5 released , resampling (interpolation) support added

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] EVO 0.0.5 released , resampling (interpolation) support added
From: Benno Senoner (sbenno_AT_gardena.net)
Date: Tue Sep 19 2000 - 21:18:08 EEST


On Tue, 19 Sep 2000, Paul Barton-Davis wrote:
>
> float oscil(unsigned int si, float wave[], unsigned int *phs)
> {
> int i;
>
> i = (*phs >> (UINTBITS - WTABLE2PWR));
> *phs += si;
> return(wave[i]);
> }

this is the optimized version , right ?
Basically what he is doing is using fixed point math:
interpreting a part of the 32 word as integer part,
and the other as fractional part.

I've thought about this , but in EVO's case we have to
deal with samples up to 2GB, that means we need the full
32bit for the integer part.
One solution could be to use 64 bit ints, and use
32bit for the integer and 32bit for the fractional part.
But you know 64bit ints aren't that fast on 32bit machines.

I'll try both custom FP asm (rounding and then check if
the fractional part is >1.0 and in that case decrement it by
1.0 and increase the int part by 1),
and 64bit int math.
Runnig some benchmarks will reveal us what's faster
(I suspect the FPU will win).
It really pays off to optimize that small code section,
because it's in the innermost loop, thus making a significant
difference in the number of voices you can achieve.
I'll post my findings when the asm code will be ready.

Benno.


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Tue Sep 19 2000 - 20:17:33 EEST