Minim Problem
in
Core Library Questions
•
1 year ago
Im trying to play an audio file in a program. I had it working but when i went to convert it into a class it wont work.
Edit: The error im getting is "cannot convert from AudioPlayer to audio_test.song".
- song song;
void setup (){
song = new song();
}
void draw(){
song.play();
}
- import ddf.minim.*;
//import processing.core.*;
class song {
Minim minim;
AudioPlayer song;
song() {
}
void play()
{
size(100, 100);
song
// this loads mysong.wav from the data folder
song = minim.loadFile("12.wav");
song.play();
}
void draw()
{
background(0);
}
void stop()
{
song.close();
minim.stop();
super.stop();
}
}
Edit: The error im getting is "cannot convert from AudioPlayer to audio_test.song".
1