On Wed, Jul 27, 2011 at 11:11 PM, Hans-Christoph Steiner <h...@at.or.at>wrote:

>> I think the big question that needs to be answered before this gets
included is:
>> can this be done without majoring impacting 32-bit operation?

The intention is:
- Pd source code with unaltered functionality
- compilable with pd floattype 'float' or 'double'
- as little conditional compilation as possible
- no performance loss respective to current Pd

Based on test results I think it's possible to rewrite the code in such a
way that single precision Pd will not be affected in any way. I still have
to rewrite tabosc~ which also uses Hoeldrich's method, this will be easy.

>> As for 64-bit floats to output, a quick hack to get things working is
>> to just hammer samples down to 32-bits...

I was looking for a suitable spot in the code to do this. First looked at
dac~, but since there may be many dac~s instantiated this is not most
efficient. Then I found sys_send_dacs(), where the integrated sample values
are checked for max absolute value. It is however not possible to do a
simple typecast here because samples are just stored back into *sys_soundin
and *sys_soundout which are type t_sample. Maybe dac~ should integrate
samplevalues in an intermediate vector of type t_sample. And then, in
sys_send_dacs(),
integrated samples could be checked, cast to float and stored into
*sys_soundout
vector of type float. And something similar for the input. That's what I'll
try.

Katja
_______________________________________________
Pd-dev mailing list
Pd-dev@iem.at
http://lists.puredata.info/listinfo/pd-dev

Reply via email to