I am working on a music player and lets say I want to change the album name of a specific song with the use of jaudiotagger. musicFolder.listFiles()[i] is here the ith entry in the list of all musicFiles in my Folder.
String filepath = musicFolder.listFiles()[i].getPath();
AudioFile audioFile = AudioFileIO.read(new File(filepath));
Tag tag = audioFile.getTag();
if (tag != null) {
tag.setField(FieldKey.ALBUM, "Album2024");
audioFile.commit();
}
But no matter which song try, I always get the error “No audio header found within …mp3.”