So for like the last couple hours I have been trying to figure out how to play an mp3 file in my app. Everything I have tried looking up has like a hundred lines of code and I don’t even know what it is doing. I have never tried using outside libraries before in processing so I think this could be causing some confusion for me too.
The best that I’ve found that would maybe work is this:
MediaPlayer mp = new MediaPlayer(); mp.setDataSource("/mnt/sdcard/yourdirectory/youraudiofile.mp3"); mp.prepare(); mp.start();
which I found here.
But from this, I don’t know what the file path would be to the mp3 file in the data folder.