[PD] dsp external pointer problem

IOhannes m zmoelnig zmoelnig at iem.at
Thu May 12 10:43:45 CEST 2011


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 2011-05-12 10:34, Ahmet Kizilay wrote:
>
>   while(n--) {
>     *out = 0.0;

signals can share memory, e.g. the pointer to the/an input vector might
be the same as the pointer to the/an output vector.
therefore the above _might_ overwrite the data in one of the input signals.
you should do something like:
while(n--) {
  t_sample tmp=0;
  for(j = 0; j < 2; j++)
    tmp += *ins[j]++;
  *out++=tmp;
}

fgmasdr
IOhannes
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk3Lnb4ACgkQkX2Xpv6ydvRPlgCgt1hw5sNdPGAt2dVvCHR1Lwtm
YcoAnir/XjuC2GMZJnihQH/yhRwyDQDG
=Ep0b
-----END PGP SIGNATURE-----

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3636 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20110512/c04dca5d/attachment.bin>


More information about the Pd-list mailing list