What's the best way to use aligned buffers?


#1

Data structure alignment is quite a new topic for me. However I want to use the pffft library in a plugin. The problem is pffft requires 16 byte aligned buffers, so it doesn’t work straight away using the AudioBuffer provided by the ProcessBlock.
The function for allocating memory provided by pffft is: void *pffft_aligned_malloc(size_t nb_bytes). I can typecast that to a float pointer and copy the data over from the buffer. Then after doing my stuff I can copy it back for output.
Is this the best way to approach this?
Thanks!


#2

seens like the AudioBuffer is aligned already!


Nice! Sorry for opening another thread about this…