I tried to write a program that plays a sound file, but so far have not been successful. I can not understand some parts of the code:
InputStream is = new FileInputStream("sound file"); AudioFormat af = new AudioFormat(float sampleRate, int sampleSizeInBits, int channels, boolean signed, boolean bigEndian);
- In the
AudioFormat constructor, how can I find out the sampling rate, file size in advance, what are the channels and 2 boolean variable at the end? - How can I get the value of the frame sample (
length )? - Also, how do I call the start method? I do not need data from any line, but from a file stored in a folder (for example, a clip)
source share