更新时间:2023-11-10 13:40:52
正如 Vlad 指出,不要分配堆栈上有 50MB.
As Vlad pointed out, don't allocate 50MB on the stack.
但是,这一点没有实际意义,因为您不需要分配任何数据.尝试使用对 std::reverse的单个调用替换整个代码片段代码>
:
But, the point is moot because you don't need to allocate any data. Try replacing your entire code fragment with a single call to std::reverse
:
std::reverse(&sound_data[0], &sound_data[track_samples]);
#include
.