Simplest Play soundFiles in android with processing 3.0.1

AndroidSoundLibrary.

Features:
- load sound files from data folder.
- load Sync() or Async() modes, for small SFX files or large Music files.
- play files as than simple as: soundPlay( mySound );
- play files from specific position: soundPlay( mySound, position ); position in milliseconds.
- stop sound file.
- check if is playing sound with: soundIsPlaying( mySound );
- soundGetPosition( mySound );
- soundPause( mySound, true/false );
- soundSetLoop( mySound, true/false );
etc etc etc..

The zip includes 3 examples of use with different features. Enjoy ;)

DOWNLOAD: https://dl.dropboxusercontent.com/u/65979707/processing/AndroidSoundLib.zip

With the intention of unifying the desktop API version it is under development by minim with the exact same API to avoid amending absolutely no application to export to android / desktop.

Comments

  • edited January 2016

    edit.

  • edited January 2016

    edit

  • Updated! 3 examples for download on init post. desktop version incomming for unify API..

  • Cool beans! So, you're also saying this this will become part of minim at some point as well?

  • Hello Sirius, I mean I'm working on this API to use in desktop using 'minim' or Android using MediaPlayer, so the programer just add the "mod_sound_Android.pde" file to compile for android, or file "mod_sound_Desktop.pde" to compile for Windows, Linux or MacOSX. Thus the application code remains the same ;)

  • Ah, I see. Thanks for the clarification. I'm just getting back to Processing and the improved Android support is not familiar yet. :)

  • UPDATED! Now available with identical API for Windows/linux/MacOSX/Android ;) Download on init thread. Enjoy.

    Only you decide to use android file or Desktop file included on this .ZIP.

  • Hello, Thanks for this nice AndroidSoundLibrary Is it possible to play and stop several sound threw it ? I'm able to play several files (Track0, Track1, ....) but when I add a soundStop(Track0) for example, I don't hear anymore sound at all I'd like to play one sound per "screen", I have 11 "screens" each define in a switch case 0: drawScreen0(); break; so Id'like to stop the sound Track0 once on the screen 1 ... is it possible ? Did I missed something ?

    thanks Benjamin

  • b01b01
    edited May 2016

    It works ! see other thread above

  • @erkosone Hi! I have tried install the library in processing 3, inside libraries folder, but when I try run the examples on my android device (samsung) I can not to hear the sound, in each example for android exist a "mod_sound_android" what is the steps for run your examples on android device? firt "mod_sound_android" ? thanks

  • @erkosone there is a way to play two or more .mp3 files depending each event using your library? Thanks.

  • Hello... Maybe you know if this lib can help to reproduce one file and then another file? I mean... For example if a varible a is 0 then play x.mp3 but if a = 1 then play y.mp3.... Is it possible?

  • @eliazherrera: yes it´s posible. @juecastroco: yes. it´s posible.

  • Link broken !!!!

Sign In or Register to comment.