简体   繁体   English

如何在Windows(和OSX)中进行采样率转换

[英]How to do a sample rate conversion in Windows (and OSX)

I am about to write an audio file converter for my side job at the university. 我准备为我在大学的旁边工作写一个音频文件转换器。
As part of this I would need sample rate conversion. 作为其中的一部分,我需要采样率转换。 However, my professor said that it would be pretty hard to write a sample rate converter that was both of good quality and fast. 然而,我的教授说,这将是非常难写一个采样率转换器,这是两个质量好速度快。

On my research on the subject, I found some functions in the OSX CoreAudio-framework, that could do a sample rate conversion (AudioConverter.h). 在我对这个主题的研究中,我发现OSX CoreAudio框架中的一些函数可以进行采样率转换(AudioConverter.h)。 After all, an OS has to have some facilities to do that for its own audio stack. 毕竟,操作系统必须有一些设施才能为自己的音频堆栈做到这一点。

Do you know a similar method for C/C++ and Windows, that are either part of the OS or open source? 您是否知道C / C ++和Windows的类似方法,它们是操作系统的一部分还是开源的?
I am pretty sure that this function exists within DirectX Audio (XAudio2?), but I seem to be unable to find a reference to it in the MSDN library. 我很确定这个函数存在于DirectX Audio(XAudio2?)中,但我似乎无法在MSDN库中找到它的引用。

Try Secret Rabbit Code (= SRC = Sample Rate Conversion ) It's GPL, it's fast and it's high quality. 尝试秘密兔码(= SRC =采样率转换)这是GPL,它速度快,而且质量很高。 http://www.mega-nerd.com/SRC/license.html http://www.mega-nerd.com/SRC/license.html

If you're worried about quality, check out http://src.infinitewave.ca/ . 如果您担心质量问题,请访问http://src.infinitewave.ca/ Very good comparisons on different resamplers. 对不同的重采样器进行了非常好的比较。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM