简体   繁体   English

Android的声音应用SDK或NDK?

[英]android sound app sdk or ndk?

I've been experimenting with making an android app for the past week or two and have reached a point where I need to decide on a general plan of action concerning the code I'm writing. 在过去的一两周里,我一直在尝试制作一个android应用程序,现在我需要确定与所编写代码有关的总体行动计划。

started with SoundPool, easy to use, not very flexible. 从SoundPool开始,易于使用,不是很灵活。 went on to AudioTrack, seems good but slow. 继续使用AudioTrack,看起来不错但是很慢。

So now I'm looking at the ndk.. Does the ndk have direct access to AudioTrack? 所以现在我看ndk。ndk是否可以直接访问AudioTrack? or something else? 或者是其他东西?

What is the general concensus on this kind of thing? 对这种事情的普遍共识是什么?

A guess is to make the UI in java and the 'sound engine' in C++ 一种猜测是在Java中创建UI,在C ++中创建“声音引擎”

I'd like to get started on the right track before I write too much. 我想在开始写作之前就走上正确的道路。

edit: 编辑:

It is a music studio that plays and manipulates wav files from the sdcard as well as realtime sound synthesis. 它是一家音乐工作室,可播放和处理sdcard中的wav文件以及实时声音合成。

The Android SDK doesn't offer a fully featured audio processing solution like Core Audio on iOS. Android SDK没有提供功能强大的音频处理解决方案,例如iOS上的Core Audio。 The available features are exposed through OpenSL ES interface. 可用功能通过OpenSL ES界面公开。 Any audio processing feature's availability is dependent on the device manufacturer's Android flavor and configuration, so you can not rely on them. 任何音频处理功能的可用性都取决于设备制造商的Android版本和配置,因此您不能依赖它们。

To wit, the infamous Android fragmentation problem is even bigger in audio. 也就是说,臭名昭著的Android碎片问题在音频方面甚至更大。

Even worse, if a device reports an audio feature available, it may still not work properly. 更糟糕的是,如果设备报告有可用的音频功能,则可能仍无法正常工作。 For example: audio playback rate on a Samsung Galaxy Note III. 例如:Samsung Galaxy Note III上的音频播放速率。

Realtime sound synthesis? 实时声音合成? None of the Android SDK's features are designed for that. 没有Android SDK的功能是为此目的而设计的。

The best way is doing the UI in Java and dealing with sound in C++. 最好的方法是用Java编写UI,并用C ++处理声音。

There are some 'audio engine' offers on the web, but many of them are just “wrappers” around the same thing. 网络上有一些“音频引擎”产品,但其中许多只是围绕同一事物的“包装器”。

As cofounder of Superpowered, allow me to recommend the use the Superpowered Audio SDK, which is a total audio processing solution designed for real-time and highest performance, without any dependency on Android's audio offerings, and runs on all. 作为Superpowered的共同创始人,请允许我推荐使用Superpowered Audio SDK,它是为实时和最高性能而设计的完整音频处理解决方案,完全不依赖于Android的音频产品,并且可以全部运行。

http://superpowered.com/ http://superpowered.com/

There are a ton of Audio Latency issues in Android. Android中存在大量音频延迟问题。 There's really not anything that can be done about it. 确实没有什么可以做的。 It seems like ICS (4.0) may have done some improvements on it, from what I've read. 从我阅读的内容来看,ICS(4.0)似乎已经对其做了一些改进。

You could subscribe to Andraudio and you'd actually be better off directing Android Audio questions through their emailing list than through Stackoverflow: 您可以订阅Andraudio,实际上最好通过他们的电子邮件列表来指导Android Audio问题,而不是通过Stackoverflow:
http://music.columbia.edu/mailman/listinfo/andraudio http://music.columbia.edu/mailman/listinfo/andraudio

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

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