本文整理汇总了C#中org.peek方法的典型用法代码示例。如果您正苦于以下问题:C# org.peek方法的具体用法?C# org.peek怎么用?C# org.peek使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org
的用法示例。
在下文中一共展示了org.peek方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: decode
/// <summary>Decode the given input bits.</summary>
/// <remarks>Decode the given input bits.</remarks>
/// <param name="bits">- Speex bits buffer.</param>
/// <param name="out">- the decoded mono audio frame.</param>
/// <returns>1 if a terminator was found, 0 if not.</returns>
/// <exception cref="java.io.StreamCorruptedException">
/// If there is an error detected in the
/// data stream.
/// </exception>
public virtual int decode(org.xiph.speex.Bits bits, float[] @out)
{
int i;
int sub;
int wideband;
int ret;
float[] low_pi_gain;
float[] low_exc;
float[] low_innov;
ret = lowdec.decode(bits, x0d);
if (ret != 0)
{
return ret;
}
bool dtx = lowdec.getDtx();
if (bits == null)
{
decodeLost(@out, dtx);
return 0;
}
wideband = bits.peek();
if (wideband != 0)
{
wideband = bits.unpack(1);
submodeID = bits.unpack(3);
}
else
{
submodeID = 0;
}
for (i = 0; i < frameSize; i++)
{
excBuf[i] = 0;
}
if (submodes[submodeID] == null)
{
if (dtx)
{
decodeLost(@out, true);
return 0;
}
for (i = 0; i < frameSize; i++)
{
excBuf[i] = VERY_SMALL;
}
first = 1;
org.xiph.speex.Filters.iir_mem2(excBuf, excIdx, interp_qlpc, high, 0, frameSize,
lpcSize, mem_sp);
filters.fir_mem_up(x0d, h0, y0, fullFrameSize, QMF_ORDER, g0_mem);
filters.fir_mem_up(high, h1, y1, fullFrameSize, QMF_ORDER, g1_mem);
for (i = 0; i < fullFrameSize; i++)
{
@out[i] = 2 * (y0[i] - y1[i]);
}
return 0;
}
low_pi_gain = lowdec.getPiGain();
low_exc = lowdec.getExc();
low_innov = lowdec.getInnov();
submodes[submodeID].lsqQuant.unquant(qlsp, lpcSize, bits);
if (first != 0)
{
for (i = 0; i < lpcSize; i++)
{
old_qlsp[i] = qlsp[i];
}
}
for (sub = 0; sub < nbSubframes; sub++)
{
float tmp;
float filter_ratio;
float el = 0.0f;
float rl = 0.0f;
float rh = 0.0f;
int subIdx = subframeSize * sub;
tmp = (1.0f + sub) / nbSubframes;
for (i = 0; i < lpcSize; i++)
{
interp_qlsp[i] = (1 - tmp) * old_qlsp[i] + tmp * qlsp[i];
}
org.xiph.speex.Lsp.enforce_margin(interp_qlsp, lpcSize, .05f);
for (i = 0; i < lpcSize; i++)
{
interp_qlsp[i] = (float)System.Math.Cos(interp_qlsp[i]);
}
m_lsp.lsp2lpc(interp_qlsp, interp_qlpc, lpcSize);
if (enhanced)
{
float k1;
float k2;
float k3;
//.........这里部分代码省略.........