Android mediaplayer
in
Android Processing
•
8 months ago
I'm in a bit of a rush posting this sorry about any mistakes. How do I access an .ogg file in my data folder using the mediaplayer? I don't know how to create a res/raw folder. I'm I suppose to? Here's what I've tried. I've commented out the lines that throw IO exceptions.
- import android.media.MediaPlayer;
- import android.media.AudioManager;
- MediaPlayer MPyeah;
- boolean bFirstRun;
- void setup()
- {
- size(displayWidth, displayHeight);
- MPyeah = new MediaPlayer();
- //MPyeah.setDataSource("r.ogg");
- background(255);
- fill(80);
- }
- void draw()
- {
- background(255);
- if(bFirstRun)
- {
- //MPyeah.prepare();
- //MPyeah.start();
- }
- bFirstRun = false;
- }
1