I have been looking for good examples of sound mixing using Java in vain. I am developing an Android app and would like to implement such feature. I am mainly looking for a way of mixing (or merging) multiple wav or mp3 sounds into a single sound file and save it as a specific format (mp3 or wav). I have found a couple of sources, unfortunately they don't offer enough comprehensive documentations. I just don't want to copy and past codes without understanding the core concepts. I have tried to implement the Jmusic library, but I keep getting errors and my app always crashes when reading the files. Any help would be greatly appreciated. Thanks
Asked
Active
Viewed 1,555 times
1
-
for simple needs mixing two sounds simply consists in taking the amplitudes of the two sounds, adding them, and then dividing the result by two. If you have two *.wav* at the same frequencies/bit-precision it's really just one addition and one shift (to divide by two). I've answered a related (but not identical) question here (the question contains runnable code): http://stackoverflow.com/questions/7875861/multiple-sounds-on-java/7876158#7876158 – TacticalCoder Dec 30 '11 at 01:34
-
1Hey did you get any success? – Ali Dec 20 '12 at 01:20