当前位置: 首页>>代码示例>>C#>>正文


C# org.peek方法代码示例

本文整理汇总了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;
//.........这里部分代码省略.........
开发者ID:sangnvus,项目名称:technical-docs,代码行数:101,代码来源:SbDecoder.cs


注:本文中的org.peek方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。