JustFLAC icon indicating copy to clipboard operation
JustFLAC copied to clipboard

FlacAudioFileReader (spi) reads Flac files with invalid values

Open 1nikolas opened this issue 4 years ago • 1 comments

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

1nikolas avatar Jul 02 '20 16:07 1nikolas

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.

drogatkin avatar Jul 02 '20 18:07 drogatkin