atom feed13 messages in at.iem.pd-listRe: [PD] readanysf~ almost beta
FromSent OnAttachments
augustApr 14, 2003 8:16 am 
Frank BarknechtApr 14, 2003 9:54 am 
Thomas GrillApr 14, 2003 10:10 am 
augustApr 14, 2003 10:20 am 
augustApr 14, 2003 10:26 am 
Thomas GrillApr 14, 2003 10:34 am 
augustApr 14, 2003 10:38 am 
Frank BarknechtApr 14, 2003 10:41 am 
Thomas GrillApr 14, 2003 11:04 am 
augustApr 14, 2003 11:11 am 
Mathieu BouchardApr 14, 2003 11:52 am 
Maurizio Umberto PuxedduApr 20, 2003 8:58 am 
Maurizio Umberto PuxedduApr 22, 2003 3:07 pm 
Subject:Re: [PD] readanysf~ almost beta
From:Mathieu Bouchard (mat@sympatico.ca)
Date:Apr 14, 2003 11:52:18 am
List:at.iem.pd-list

On Mon, 14 Apr 2003, august wrote:

float buf[n*2]; // always multiply by the number of audio signal outlets n is not constant since it's a function argument, and you try to reserve an array of float with that. Amazing that your compiler digests that (mine doesn't) ... it's definitely not C++ as i know it.

im not sure, but i think it treats the float[] kindof like a new() call.

This is a GCC-specific extension to C/C++; it's a shortcut for alloca(), which does its allocation on the stack, while new and malloc() do their allocation on the heap; alloca() blocks disappear automatically upon returning from a function. new/malloc() blocks need to be deallocated.

What compiler are you using?

(note: I'm using quite a bit of GCC-specific features in my code, which is usually OK on Linux and MacOSX and Cygwin, but not good elsewhere)