Android Example MultiTrigger Soundpool Example

Discussion in 'Tutorials & Examples' started by stevel05, Jun 14, 2014.

  1. stevel05

    stevel05 Expert Licensed User

    As a response to a forum question a few months ago, I posted an example of using the Gesture Library and Soundpool to create a musical instrument interface. The example is simple an has only two sound samples, but is easily extended.

    I am reposting as the latest version of JavaObject with B4a V3.8 allows setting Interfaces. Soundpool has an OnLoadCompleteListener, which can now be accessed. This is included in the example. If you are loading a lot of samples, this can take quite a while and the instrument won't function correctly until all samples are loaded. We can now block the use of the instrument until all sounds have been loaded, making a more user friendly app.

    The sample just Logs when loading is complete, as it only loads two sounds, but you can use the listener to remove a splash panel, or message, or make buttons active or whatever you want.

    I hope it's useful.

    Requires: Gestures Library, JavaObject, Audio Library B4a 3.8+
     

    Attached Files:

    Last edited: Jan 24, 2015
    eSolution, lazreg, MaFu and 1 other person like this.
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice