-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hans-Christoph Steiner wrote:
I am attempting a merge of the PDa integer code with Pd-vanilla 0.43. Vanilla now mostly had the t_sample/t_float stuff ironed out, but there are a few minor differences between the two that I am not sure of. Here's the first that is in a bunch of places, including in d_arithmetic.c:
vanilla: t_float g = *(t_float *)(w[2]);
PDa: t_sample g = ftofix(*(t_float *)(w[2]));
It seems to me that 'g' should be t_sample, not t_float. Any ideas?
g is the scalar argument given to the object (or set via a message).
when i tried to clean up the t_sample / t_float code, the decisions i made where based on where the values come from: - - a sample within a signal vector is always t_sample - - a number in a message is always t_float - - a number in an object's argument should always be t_floatarg.
the idea is, that that the signal and the messages might have different numeric types (as is the case in PdA)
now t_float and t_floatarg are certainly mixed up often. but i tried to get the line between t_sample (signal) and t_float (not signal) right.
therefore "g" is t_float and not t_sample in the first place. it should _then_ be converted into a t_sample, before the actual arithmetic is being done on the incoming signal (of t_samples). this could be done in one line, but it probably should not, for readability's sake.
fgasmr IOhannes