本文整理汇总了C++中OutputBuffer::info方法的典型用法代码示例。如果您正苦于以下问题:C++ OutputBuffer::info方法的具体用法?C++ OutputBuffer::info怎么用?C++ OutputBuffer::info使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OutputBuffer
的用法示例。
在下文中一共展示了OutputBuffer::info方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: assert
bool AC2LPC::process(Ports<InputBuffer*>& inp, Ports<OutputBuffer*>& outp)
{
assert(inp.size()==1);
InputBuffer* in = inp[0].data;
assert(outp.size()==1);
OutputBuffer* out = outp[0].data;
assert(out->info().size==m_nbCoeffs);
assert(in->info().size>m_nbCoeffs);
while (!in->empty())
{
ac2lpc(in->readToken(),out->writeToken(),m_nbCoeffs);
in->consumeToken();
}
return true;
}
示例2: process
bool Cepstrum::process(Ports<InputBuffer*>& inp, Ports<OutputBuffer*>& outp)
{
assert(inp.size()==1);
InputBuffer* in = inp[0].data;
if (in->empty())
return false;
assert(outp.size()==1);
OutputBuffer* out = outp[0].data;
safeLogOp<double> slop;
VectorXd outDct;
while (!in->empty())
{
Map<VectorXd> inData(in->readToken(),in->info().size);
outDct.noalias() = m_dctPlan * inData.unaryExpr(slop);
memcpy(out->writeToken(),outDct.data() + m_ignoreFirst, out->info().size*sizeof(double));
in->consumeToken();
}
return true;
}
示例3: process
bool SpecificLoudness::process(Ports<InputBuffer*>& inp, Ports<OutputBuffer*>& outp)
{
assert(inp.size()==1);
InputBuffer* in = inp[0].data;
if (in->empty()) return false;
assert(outp.size()==1);
OutputBuffer* out = outp[0].data;
const int N = in->info().size;
const int M = out->info().size;
while (!in->empty())
{
Map<VectorXd> inData(in->readToken(),N);
double* outData = out->writeToken();
for (int i=0;i<NB_BARK_BANDS;i++)
outData[i] = pow(inData.segment(m_bkBdLimits[i],m_bkBdLimits[i+1]-m_bkBdLimits[i]).sum(),0.23);
in->consumeToken();
}
return true;
}