据我所知,这是不是无限循环引起的。
该方案与较小的阵列(它是音频编辑器)正确地发挥作用。 我现在已经增加的功能性,以允许更大的阵列(最多5分钟的音频,26460000个16位数据〜50MB的)。
因为增加数组的大小我在一个特定的功能,它应该由阵列写入到一个新的数组倒退,然后重写原数组反向输入文件的播放接收堆栈溢出错误。 我猜每个阵列可高达50MB,这可能是问题所在:
//initialise temporary new array to place samples in
short signed int reverse_data[max_number_samples];
for (i=0; i<track_samples; i++)
{ //puts data from sound_data into reverse_data backwards.
reverse_data[(max_number_samples-1)-i]=sound_data[i];
}
for (i=0; i<track_samples; i++)
{ //now overwrites sound_data with the data in reverse_data
sound_data[i]=reverse_data[i];
}
我一般是相当新的C ++和编程,和我不确定什么调试过程中出现了错误真的告诉我。
任何帮助,将不胜感激,我敢肯定有一个很简单的解决办法(我读过的东西,涉及“堆”,但我不相信什么a'heap”确实是)。