The AudioTrack class has write(...)
methods which accept byte[]
or short[]
as the source parameters. It's the only Android sound class I know of that does.
Android mixing raw sounds. Source is java arrays not files or recourses
-
09-12-2021 - |
Question
I have audio data in uncompressed raw format as java arrays. short[] or byte[] I wish to play them in Android.
SoundPool looks like what I need but I can't find way to load data from memory. It loads from files only and I am not sure how do I specify format that it is raw data.
Solution
OTHER TIPS
A library called libpd can give you many audio features lacking in Android. The learning curve is a bit steep, but it's powerful stuff.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow