Re: [ecasound] need some buffering advice

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

Subject: Re: [ecasound] need some buffering advice
From: Kai Vehmanen (k_AT_eca.cx)
Date: Tue Nov 04 2003 - 01:56:53 EET


On Fri, 3 Oct 2003, Julian Dobson wrote:

> Kai Vehmanen wrote:
>> All signal processing (and routing) components work on float data. Passing
>> integer data around would require adding totally new signal paths and
> So not a job for the faint-hearted then...
[...]
> Still, maybe a solution would be to replace hard-coded types with a
> macro, then allow the user to choose the data type to use. That way,
> anyone who (a) needs the speed, (b) doesn't care about the precision can
> compile with ints - the rest of us can use floats.

Actually it's much more difficult than that. There's already a macro - or
more accurately a typedef - in place in 'ecasound/libecasound/sample-specs.h'
for changing the sample type. You can freely select between a 32bit float
and a 64bit float. But if you change it to an integer, it breaks pretty
much everything as you'd have to also change all calculations
that touch sample data to understand integer value ranges.

Good example of this difficulty is the time it took for someone to finally
write an integer-based ogg-vorbis decoder. Although the int-version was
badly needed (small embedded devices like portable players rarely have an
FPU -> float calculations are _slow_), the int-port took a _long_ time to
surface even though float-based version was freely available...

-- 
 http://www.eca.cx
 Audio software for Linux!


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

This archive was generated by hypermail 2b28 : Tue Nov 04 2003 - 01:59:42 EET