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.
DSPACK example for converting audio sample rate on the fly?
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.
Thanks. That filter page you linked to is one hell of a resource for DirectShow filters, not just for the ACM Wrapper Filter. Anybody else who reads this should follow that link. –
Stine
Just a note to readers of this page. The Audio Resampler DSP is part of the Media Foundation API and that requires Windows Vista or later. Very cool API, but if you need to support Windows XP make sure you are aware of that: msdn.microsoft.com/en-us/library/ms694197(VS.85).aspx –
Stine
© 2022 - 2024 — McMap. All rights reserved.