I'm working on a custom audio library object, and have changed AUDIO_BLOCK_SIZE from 128 to 16 samples in my project to improve some latency issues. That all works just fine.
This leads me to several questions that hopefully Paul or any other knowledgeable person might be able to answer.
If I allocate() a block, will this block size be 16 or 128 samples in size?
The reason I ask, is in one case my code was reading more than 16 values from EEPROM and writing to the single block I had allocated(), and I was also reading back these values correctly from that single pointer for up to 64 sample memory locations.
So I need to ask, is the allocated() block always a defined number of memory locations like 128, or does this size change and equal that called out in the AUDIO_BLOCK_SIZE declaration?
If the allocated() block is in fact being reduced to 16 memory locations in my case, can someone please advise me on how to allocate() more blocks of this same size and have them be located sequentially one after the other in memory/code, when the code is compiled. For instance if my first allocated() block is called "tempCalc", would allocating additional blocks called "tempCalc2", "tempCalc3", and "tempCalc4" place the later right after "tempCalc" in memory?
I'm curious how the compiler arranges all allocated blocks in memory. Does it go line by line in your code placing one after the other, or does is it arrange them alphabetically, or is it possible that each block will simply be wherever in memory?
This leads me to several questions that hopefully Paul or any other knowledgeable person might be able to answer.
If I allocate() a block, will this block size be 16 or 128 samples in size?
The reason I ask, is in one case my code was reading more than 16 values from EEPROM and writing to the single block I had allocated(), and I was also reading back these values correctly from that single pointer for up to 64 sample memory locations.
So I need to ask, is the allocated() block always a defined number of memory locations like 128, or does this size change and equal that called out in the AUDIO_BLOCK_SIZE declaration?
If the allocated() block is in fact being reduced to 16 memory locations in my case, can someone please advise me on how to allocate() more blocks of this same size and have them be located sequentially one after the other in memory/code, when the code is compiled. For instance if my first allocated() block is called "tempCalc", would allocating additional blocks called "tempCalc2", "tempCalc3", and "tempCalc4" place the later right after "tempCalc" in memory?
I'm curious how the compiler arranges all allocated blocks in memory. Does it go line by line in your code placing one after the other, or does is it arrange them alphabetically, or is it possible that each block will simply be wherever in memory?