我在ShortBuffer
变量中有数据。
我想push_back
在std::vector<short>
input
变量中。我使用了以下代码,但由于 for 循环很长,应用程序冻结了。
还有另一种方法吗?
ShortBuffer *pBuffer1 = pData->AsShortBufferN();
std::vector<short> input(BUFFER_SIZE);
for (int i = 0; i < BUFFER_SIZE-1; ++i) {
short out1;
pBuffer1->Get(out1);
input.push_back(out1);
}