DSPACK example for converting audio sample rate on the fly?

不羁的心 提交于 2019-12-13 16:59:19

问题


I am using DSPACK with Delphi 6 Pro.
I am looking for a good sample that shows how to create a filter graph that will convert the sample rate of an audio stream to a desired format (sample rate, bit depth, and number of channels) in real time.
Does anyone know of a good example project that shows how to structure the filter graph with DSPACK to do this? If not with DSPACK, then if you know of a good example or web page that discusses the general DirectX filter graph concepts involved, I can use that.
I also know C/C++ and can follow a C# example well enough.


回答1:


You need a resampling filter to do this. Options include:

  • implement a filter which does Audio Resampling
    • using some resample code/library, see Free Resampling Software
    • wrapping Media Foundation Audio Resampler DSP, if you are OK with its runtime requirements
  • use third party filter

Having such filter available, you will need to build a transcoding graph with audio source, resampler and target of your conversion (such as file).

Also as far as I remember, that stock ACM Wrapper Filter is capable of converting PCM audio between standard sample rates.



来源:https://stackoverflow.com/questions/7599211/dspack-example-for-converting-audio-sample-rate-on-the-fly

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!