Check out example codes for "processing audio android". It will help you in understanding the concepts better.

Code Example 1

//method using Cassette library
import cassette.audiofiles.SoundFile;

SoundFile sound;

void setup()
{
  sound = new SoundFile(this, "sound.wav");
}

void draw()
{
  if(playSound)
  {
    sound.Play();
  }
}

Learn ReactJs, React Native from akashmittal.com