I am trying to get the properties of a .wav
file I am using in my Java project using the following code. However when I run this code the methods format.getProperty("title")
, format.getProperty("author")
, and format.getProperty("duration")
all return null. Should I be getting these details in a different way?
AudioInputStream audioInputStream = AudioSystem.getAudioInputStream(wavFile);
AudioFormat format = audioInputStream.getFormat();
Object[] temp = {false,
format.getProperty("title"),
format.getProperty("author"),
format.getProperty("duration")};