简体   繁体   English

Java中音频的最快,最高效的升频例程

[英]Fastest and most efficient upsampling routine for Audio in Java

I have a need to convert audio samples from 11025 and 22050 to 44100; 我需要将音频样本从11025和22050转换为44100; I'm looking for the fastest and best sounding conversion routine. 我正在寻找最快,最好的声音转换程序。 I require that the answer be given in pure Java, without the need for external routines or libraries. 我要求答案是用纯Java给出的,而不需要外部例程或库。 The source is an array of short values representing left and right channels, interleaved like so LRLRLRLR 源是表示左右声道的短值数组,就像LRLRLRLR这样交错
I've heard that gaussian transformation is the best, but it is a cpu killer. 我听说高斯变换是最好的,但这是cpu的杀手er。

Update 更新资料
To add more detail, I would like a mix between best and fastest. 要添加更多细节,我想在最好和最快之间进行混合。 The answer would give great sounding audio suitable for near real-time communication. 答案将给出适合近实时通信的出色声音。
Update 2 更新2
I'm looking for some short code examples for this one, should be ez points for you audio guru's 我正在为此寻找一些简短的代码示例,应该是音频专家的ez points。

Well, it is hard to resample it slow enough so that it is not realtime :-) One of the best & still fast solutions is to do forward FFT, and then do reverse FFT with any sample rate you need. 好吧,很难对其进行足够慢的重新采样以至于它不是实时的:-)最好且仍然快速的解决方案之一是进行正向FFT,然后以所需的任何采样率进行反向FFT。

You may implement this on your own, or copy & paste any FFT implementation. 您可以自己实现,也可以复制并粘贴任何FFT实现。

This might work like 100x realtime or faster, not sure you need 1000x faster (in this case you can go for linear or bicubic interpolation) :-) 这可能像实时的100倍或更快速地工作,不确定是否需要更快的1000倍(在这种情况下,您可以进行线性或双三次插值):-)

you can (ultimately) just use a fir after filling every other sample with 0s - you're upsampling by 2 or 4. this will be plenty fast for realtime. 您可以(最终)在用0s填充其他所有样本后仅使用fir-您将要进行2或4的上采样。 audio quality will be fine for most applications. 音频质量将适合大多数应用。

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

相关问题 用Java删除重复项的最快,最有效的方法 - Most fastest and efficient way to remove duplicates in Java 确定十进制值的最快最有效的方法是Java中的整数 - Fastest most efficient way to determine decimal value is integer in Java 用Java最快,最高效地将字节数组转换为29位整数 - Fastest and most efficient conversion of a byte array to a 29 bit integer in Java 在Java中搜索键值对的最快,最有效的方法? - Fastest and most efficient way of searching a key-value pair in Java? Java下采样和上采样上采样 - Java down and upsampling upsampling 最快/最高效的方式来解析文档,搜索字符串并使用Java将其替换为文档中的字符串 - Fastest/Most efficient way to parse a document, search for strings and replace them in document with Java 在java中连接两个大(超过1.5GB)文件的最有效(最快)方法是什么? - What is the most efficient (fastest) way to concatenate two large (over 1.5GB) files in java? 创建 XML 的最快和最有效的方法 - Fastest and most efficient way to create XML 在Java中使用最快,最有效利用内存的BZip2解压缩工具是什么 - What's the fastest and most memory efficient BZip2 decompression tool to use in Java Java-最有效的匹配方法 - Java - Most efficient matching method
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM