Java进行音频处理是否切合实际? [英] Java for Audio Processing is it Practical?

查看:111
本文介绍了Java进行音频处理是否切合实际?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Java的是一个合适的替代C / C ++进行实时音频处理?

Is Java a suitable alternative to C / C++ for realtime audio processing?

我正在考虑一个应用程序使用〜100(最大)与延时线(30岁@ 48kHz的)音频,过滤(512点FIR?),同时每个轨道上发生的其他DSP类型的操作轨迹。

I am considering an app with ~100 (at max) tracks of audio with delay lines (30s @ 48khz), filtering (512 point FIR?), and other DSP type operations occurring on each track simultaneously.

该操作将被转换并执行浮点。

The operations would be converted and performed in floating point.

系统可能会是一个四核3GHz的4GB内存,运行Ubuntu。

The system would probably be a quad core 3GHz with 4GB RAM, running Ubuntu.

我所看到的关于Java比以前要快得多,即将接近C / C ++,现在有实时扩展,以及文章。这是现实?是否需要硬核编码和调试,以达到%50〜100%,业绩的C有些spec'ing?

I have seen articles about Java being much faster than it used to be, coming close to C / C++, and now having realtime extensions as well. Is this reality? Does it require hard core coding and tuning to achieve the %50-%100 performance of C some are spec'ing?

我真的找了意义,如果这是可能的,抬起头对任何陷阱。

I am really looking for a sense if this is possible and a heads up for any gotchas.

推荐答案

有关你经常有大部分的时间都花在code只有很小部分的音频应用。

For an audio application you often have only very small parts of code where most of the time is spent.

在Java中,你可以随时使用JNI(Java本地接口)和移动你的计算沉重code到C-模块(或装配使用SSE,如果你确实需要的功率)。所以,我想说的使用Java和得到您的code工作。如果事实证明你不符合你的绩效目标使用JNI。

In Java, you can always use the JNI (Java Native interface) and move your computational heavy code into a C-module (or assembly using SSE if you really need the power). So I'd say use Java and get your code working. If it turns out that you don't meet your performance goal use JNI.

90%code的将很可能是胶水code和应用的东西反正。但是,请记住,你失去了一些跨平台的功能的方式。如果你能与JNI生活将永远离开你的门打开本地code性能。

90% of the code will most likely be glue code and application stuff anyway. But keep in mind that you loose some of the cross platform features that way. If you can live with that JNI will always leave you the door open for native code performance.

这篇关于Java进行音频处理是否切合实际?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆