Nooby Q:Aligned memory

I’m using regular malloced memory for my sample buffers, but I noticed that JUCE provides some alternatives.

So, is there any advantages to using the MemoryBlock or AlignedMemoryBlock classes instead? And why would I choose Aligned?

And is there any advantage to using AudioSampleBuffer instead, even though I dont need any of the methods the class provides?


i don’t think there aren’t any advantages on working with memoryblock classes than with memory direct, apart from a bunch of functions that are defined. the only thing that makes me use aligned memory (but i’m using _aligned_malloc directly instead of an instance of AlignedMemoryBlock) is that u can process the block with sse/sse2 vectorization code (asm or intrinsics)…

Ok! Thanks!

If you are looking for another alternatives, here is one.

Masanao Hayashi