Thought this should probably go to the list:
---------- Forwarded message ----------
From: Spencer Russell <spencer.f.russ...@gmail.com>
Date: Tue, Sep 29, 2009 at 11:13 AM
Subject: Re: fixing Flext for 64-bit?
To: Thomas Grill <g...@grrrr.org>
Am 29.09.2009 um 15:00 schrieb Spencer Russell:
Hi Thomas,
I'm writing a Flext external to implement Iannis Xenakis's Dynamic
Stochastic Synthesis, and running into some problems with buffer
handling on my 64-bit system.
It seems that currently flext uses the deprecated
garray_getfloatarray() function and t_sample arrays, instead of
the
new garray_getfloatwords() function with t_word unions.
Changing the code would make flext incompatible with older
versions of
PD, but some other external developers are currently using an
#ifdef
workaround to change to the newer API call for PD versions that
support it.
I was going to get in there and see if i can't get it working in
the
flext code, but I wanted to check with you first to see if you had
already done any work on that front. I'll of course send you the
diffs
if i get it working. Shouldn't be that hard and i think it should
really only effect the buffer-handling code, but I don't know the
flext codebase that well so there might be some hidden gotchas.
-spencer
On Tue, Sep 29, 2009 at 9:08 AM, Thomas Grill <g...@grrrr.org> wrote:
Hi Spencer,
i know that this is something i should work on, but my schedule
is insanely
tight and i don't get to it.
So, if you can make any contributions and testing on 64-bit
systems i'd be
very grateful.
I'd also go for the Pd API selecton by #ifdef statements.
gr~~~
As far as i can tell, PD since 0.41 changed arrays to be arrays of
t_words instead of t_samples or t_floats.
On 32-bit architectures they're all the same size, but on 64-bit
architectures t_word is 64-bit, while t_sample and t_float are still
32-bit.
For a normal PD external, it's pretty easy to just modify the
external
to use t_words, but I'm not sure the best way to modify flext to do
this without breaking compatibility for externals. One problem is
that
when an external calls mybuffer.Data(), what should they receive? if
the system is PD newer than 0.41, they should receive a pointer to
t_word, but MAX or older PD should receive a pointer to t_sample.
The other problem is that accessing an element for newer PD requires
accessing the w_float member of the t_word union, but the others
just
use the element itself.
There could be some sort of GetValue() wrapper for buffer elements
that could be made cross-platform, but would break compatibility
with
existing flext externals, so that seems seriously sub-optimal.
thoughts?
-s-
_______________________________________________
http://grrrr.org/ext/flext
flext mailing list
fl...@grrrr.org
http://www.parasitaere-kapazitaeten.net/mailman/listinfo/flext