nguillaumin / jflac

Forked from SourceForge
http://jflac.sourceforge.net/
Other
25 stars 10 forks source link

Skip Not Supported #18

Open ns96 opened 2 years ago

ns96 commented 2 years ago

Hi, I am currently making use of this library as part of a project I am working on to simulate digital music playback from vintage cassette tapes (https://github.com/ns96/cassetteflowJava) and found out that skip is not supported in org.jflac.sound.spi.RingedAudioInputStream.skip(RingedAudioInputStream.java:374). Are there any plans to implement this? If not, what's a potential work around?

njlarsson commented 2 years ago

I had similar problems, couldn't get skip (or rather, seek) to work. I'm actually not sure that it isn't supported, it could just be that the way it's handled by the interface is a bit surprising. I looked at the source code, and it looked like at least somebody did some work trying to get it to work, but the code looks frankly really messy and badly maintained, and I couldn't figure out how to fix it.

My workaround was to stop using jFLAC, and switching to calling the more official libFLAC via JNI. Information about that here: https://klipspringer.avadeaux.net/decoding-the-flac-audio-format-in-java/#jni

nguillaumin commented 2 years ago

Hi, sorry I have no plans to implement this. I forked the project mostly to have it on Maven Central. I'll take a pull request though :wink:

ns96 commented 2 years ago

Thanks all for the prompt responses