Nooby Q:Aligned memory


#1

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?

Thanks.


#2

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)…


#3

Ok! Thanks!


#4

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

http://www.musicdsp.org/archive.php?classid=5#54

Best,
Masanao Hayashi


#5