Learn more:
http://superpowered.com/android-audio...
Superpowered Audio Engine for Games, Music and Interactive Audio Apps on Android, iOS & OSX.
Low Latency Audio. Cross Platform. Free.
What are some best practices for a beginner in the field of audio programming? The first and most important thing is C++. You simply should know how to program in C++ because it’s the only language, which is supported by both Apple and Google; and it works on iOS, android, and Mac OS X and, you know, even under Windows you can use C and C++. These are the most important languages still. And these are the only languages capable of high performance and real time programming. So, C++, this is a must. You must learn it. Unfortunately, it will never work in Swift or in Java. Supporting C and C++ on iOS is relatively easy. It’s built in to XCode, Objective-C, and kind of Swift also built upon C and C++. There are no huge differences. On android, the situation is more complex because C++ code runs in android’s native layer, which is kind of an afterthought by Google. So, android was not designed originally to support native coding. It was Java exclusive system, but Google had to open the native layer for more serious applications such as high performance and real time audio. So, android developers should learn how to use Android Studio, which is the official development environment on android, and the android native development kit. Unfortunately, the integration between those is not trouble free. So, you know, Google is still working on the integration. It works kind of, but you can easily have problems. And the android NDK, the native development kit, uses the Java native interface to communicate between your application’s main code in Java and the native layer in C++. And unfortunately, Java native interface is, well, quite an ugly beast, but, you know, there is no other way. You should really learn it. And this is the only way for high performance, low latency audio on android. This is how Google designed the system. So, high performance, low latency audio happens in android’s native layer exclusively. And now, some more general things for beginners. Audio processing is not really an exotic thing. This was my first thought when I was a beginner developer that audio is somehow really a special field and maybe it happens on the audio hardware, or on the sound card, or in special audio chips, but no. Most of the audio processing happens on your CPU inside your application in the normal user memory space. So, it’s just like any other processing you do in your application. So, you really shouldn’t consider sound cards, and audio chips, and codecs, and all that stuff. No. No. The main thing happens on CPU and in regular buffers. So, next thing is buffers. Audio buffers are regular allocated memory spaces without any special things or features. So, audio buffers are really just allocated memory spaces and nothing more. And audio processing happens on the data inside these allocated memory spaces and audio is just, you know, a bunch of 32-bit floating-point numbers or 16-bit short integers. Of course, many audio engines are hiding those buffers because they require you, you know, to learn tons of very strange and abstract things like audio graphs, and connection objects, and lots of abstract things, which I really do not like because audio processing is not special. So, with Superpowered, we chose a different route to scrap all these obstructions and give you raw access to all of these buffers and you can process on those directly without managing any complex audio graph or such things. So, when you look at our example code, you will see all these buffers allocated and, you know, processing directly on them. But for beginners, it’s really important to know that in your code, at any point, you should know what is in those buffers, more specifically how data is represented in those buffers.
/ superpoweredsdk
https://github.com/SuperpoweredSDK