Forums > MaxMSP

buffer question


September 24, 2010 | 4:13 pm

I am recording to 8 buffers in a patch and I have send them a clear message followed by a size 20000 message when I needed to delete them.
The size message is necessary because am cropping the first to the actual length and then resizing the 7 others to this size before recording to them.

This has worked great but I was wondering if it is the most CPU & thread efficient way of doing it.

Would it be enough if I just sended a size message since it is also somhow deleting the buffer ?

I have a feeling that the clear message is more heavy since it it is setting all the samples to zero.

Thanks,

Thomas

September 26, 2010 | 7:58 pm

Thanks a lot for the test patch. I look forward to explore and test

I have omitted the clear message and use only the size 20000 message – and it works perfect.

But I am still wondering what the difference between "size" and "clear" is corewise. In the reference is says that "clear" is writing zeros to the buffer – but what is "size" really doing ? Is it also writing zeros or is it just removing the pointer to the sample array ?
Because then it might be more cpu gentle !!

thomas

Viewing 2 posts - 1 through 2 (of 2 total)

Forums > MaxMSP