Audio song mixer in android programmatically

Dinesh Sharma picture Dinesh Sharma · Nov 5, 2012 · Viewed 19.9k times · Source

I want to create an audio mixer (DJ music track) kind of app which can create Dj mixer of an audio song. User can select a music song track that can be mixed with two or more separate rhythm, bass or beat tracks to create a new modified Dj music.

I did a lot of research over this but could not find any idea or clue.

If anyone have some idea or some reference URL regarding this, please share it.

Answer

Gunnar Karlsson picture Gunnar Karlsson · Nov 12, 2012

There is no build-in library on Android that supports audio mixing (combining two audio input streams into one output stream). The Java javax.sound library which supports audio mixing was not ported to Android - there's an interesting discussion on Google Groups with Google engineer Diane Hackborn about the decision to not port javax.sound to Android.

It looks like you have to develop your own solution from scratch. There are several helpful answers on SO on how to combine two audio streams into one:

Mixing Audio Files

Audio editing in Android

Android - Mixing multiple static waveforms into a single AudioTrack