Yes, that's my secondary solution, and actually what I ended up doing for the time being. It seems inefficient to me, however, to have a bunch of arrays sitting around that I'm not using entirely. While I won't run into a problem right away with a gig of memory, it won't be too long with such an inefficient model. However, this may be more efficient than trying to resize them on the fly. I'm always looking for the "right" or "elegant" way to do things in programming, but sometimes the way that works is elegant because it works at all.
-Ian
Frank Barknecht wrote:
Hallo, Ian Smith-Heisters hat gesagt: // Ian Smith-Heisters wrote:
Yes. Hm. As it turned out my method made Pd segfault. I couldn't isolate the problem, but gdb pointed at tabread4~, so it was probably in the fact that I was resizing the array and trying to read from it at about the same time ;) If anyone's interested in the nitty gritty I'd be glad to post it, i just didn't want to waste anyone's time since I couldn't isolate it to a simple patch.
Couldn't you avoid resizing altogether by e.g. storing the length of the recorded data into a float, and then only read as far as that?
Ciao