[Free]DjSound extension

DjSound extension
This extension is based on the Soundpool class and overcomes the Sound component limit of only 10 simultan audio streams. With only 1 instance you can load a list of soundfiles into memory and play them by their id.
I made this extension for use in music apps like a Piano where you want to load a bank of Sounds at once. I can load 24 sounds without problems.
Note: Soundfiles should be under 1 mb size as the limt of the Soundpool class.
Better use mono sounds. Use ogg files for good results.


soundList: List of soundfiles

soundId: int
leftVol / rightVol: 0-100
speed: 100 = normal speed
version 1: com.django.djSound.aix (8,1 KB)
Demo aia for a piano app based on a canvas my other thread.

Update v2

I will Update the aia in my other thread these days.

19 Likes

Nice extension :+1:

1 Like

Cool extension

1 Like

This will only work with Companion and on Android < 10. So that it also works on Android > 9, the paths must point to the ASD. It won’t work at all with the APK. To do this (like the extension is now) the sound files from the assets would first have to be copied into the ASD or into one of the Shared folders.

See also here:

4 Likes

Updated first post with version 2:
Added several functions. An updated aia will follow these days.

2 Likes