Open xross opened 1 year ago
Following from this,
Should be set to CHANNELS_PER_INSTANCE as a separate define should be used for total SRC channel count.
Stack sizes set as, for example:
int iSSRCStack[SRC_CHANNELS_PER_INSTANCE][SSRC_STACK_LENGTH_MULT * SRC_N_IN_SAMPLES]; // Buffers between processing stages
e.g.
Based on
I think they should just be:
int iSSRCStack[SRC_CHANNELS_PER_INSTANCE][SSRC_STACK_LENGTH_MULT]; // Buffers between processing stages
@ed-xmos any thoughts? I wonder if this crept in when adding support for multiple instances. Its unclear to me why each instance would need stack space related to the total channel count, not just the instance channel count.
I think you are right. Making the buffers too big silently cost some memory without causing any logical problems.
Stack sizes set as, for example:
int iSSRCStack[SRC_CHANNELS_PER_INSTANCE][SSRC_STACK_LENGTH_MULT * SRC_N_IN_SAMPLES]; // Buffers between processing stages
e.g. https://github.com/xmos/lib_src/blob/693ae0f301587b97a47d5690e7658a601b3fefb8/tests/ssrc_test/dut/ssrc_test.xc#L40
Based on
https://github.com/xmos/lib_src/blob/693ae0f301587b97a47d5690e7658a601b3fefb8/lib_src/src/multirate_hifi/ssrc/src_mrhf_ssrc.h#L34
I think they should just be:
int iSSRCStack[SRC_CHANNELS_PER_INSTANCE][SSRC_STACK_LENGTH_MULT]; // Buffers between processing stages
@ed-xmos any thoughts? I wonder if this crept in when adding support for multiple instances. Its unclear to me why each instance would need stack space related to the total channel count, not just the instance channel count.