JustFLAC
JustFLAC copied to clipboard
FlacAudioFileReader (spi) reads Flac files with invalid values
Hello. I'm using spi on my project and when I try to read a Flac file with FlacAudioFileReader, framerate and bytes/frame is -1. The read format is this FLAC 44100.0 Hz, 16 bit, 2 channels, -1 bytes/frame, -1.0 frames/second
I tried many flac files and got the same result. Am I doing something wrong? Thanks
If you check https://github.com/drogatkin/JustFLAC/blob/57100f2402efad979211feb7afb4498adb46a67b/src/java/org/kc7bfi/jflac/sound/spi/FlacAudioFileReader.java#L155 then you find that these values are calculated when OGG header presented. You can add an implementation for other cases too. Let me know.