Quantcast
Channel: Android Mode - Processing 2.x and 3.x Forum
Viewing all articles
Browse latest Browse all 941

How do i get sound to play on the phone

$
0
0

The code below works fine in java mode, but it doesn't work in Android mode. I just want a simple code that will play a mp3 file when clicked. I'm pretty sure the problem is in the import of Minim, I'm guessing it doesn't work for Android. If that is the case what do I need to use?

import ddf.minim.*; AudioPlayer player; Minim minim;
void setup(){minim = new Minim(this);} void draw(){} void mousePressed() { player = minim.loadFile("sin1.mp3" ); player.play(); } void stop() { player.close(); minim.stop(); super.stop(); }


Viewing all articles
Browse latest Browse all 941

Trending Articles