I am trying to use this wavRead(filename)
but am getting the message cannot make a static reference to a non static method
.
I could simply make it static and that solves my problem, but how would do it without going that route. I would like to keep the method non static.
Here is a bit of the code to let you see whats going on:
public class Sound {
double [] mySamples;
public static void main(String[] args){
String filename = null;
System.out.println("Type the filename you wish to act upon.");
Scanner scanIn = new Scanner(System.in);
filename = scanIn.next();
wavRead(filename);
}
public void wavRead(java.lang.String fileName){
mySamples = WavIO.read(fileName);
}