我是靠谱客的博主 爱听歌朋友,这篇文章主要介绍PDM编码的软件实现PDM编码的软件实现,现在分享给大家,希望可以做个参考。

PDM编码的软件实现

PDM(Pulse-density_modulation)

// Encode samples into pulse-density modulation
// using a first-order sigma-delta modulator
// C/C++ 描述 
// x[s]: signal array
// y[S]: output PDM array
//  qe : running error           
void PDM(double x[s], double y[s], double qe = 0,) // initial running error is zero
{
  for(int n = 0, n < s, ++n)
  {  
      if(x[n] >= qe)
          y[n] = 1;
      else
          y[n] = -1;
      qe = y[n] - x[n] + qe; // calculate the error to feedback 
  }                  
}

参考资料

Wikipedia-Pulse-density_modulation

最后

以上就是爱听歌朋友最近收集整理的关于PDM编码的软件实现PDM编码的软件实现的全部内容,更多相关PDM编码内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(58)

评论列表共有 0 条评论

立即
投稿
返回
顶部