[flac-dev] Calling libFLAC from Java

Jesper Larsson (njlarsson) njlarsson at avadeaux.net
Wed Apr 12 06:35:32 UTC 2023

Hello, I joined because this list is the preferred method of communication according to web site, and I would like to tell you about something I've been working with that perhaps you would like to include among the links on the FLAC web site?

Since 2014, I have a system that runs as a service on a computer connected to my stereo to play FLAC files, exposing a web interface for playback control. I created it for my personal use, but have lately made it more streamlined and configurable to make possible for others to use.

The system includes a FLAC decoding and playing program of my own, because the player utilities I could find did not live up to my standards (the main problem being that they didn't cache data from the next track until the current one had stopped playing, which created annoying gaps between tracks, especially when playing from a disk that was NFS mounted over wifi). I wrote this in Java, first using jFLAC for FLAC decoding, but a couple of years ago I switched to using the actual libFLAC to get the full power of it, invoking it through JNI (the Java native interface), meaning that I had to put a little bit of C code as a bridge between Java and libFLAC.

I put a blog post about FLAC decoding in Java on my website, and a few months ago I noticed that most of the visitors on the site came because they had searched for that topic. I thought that maybe I should make it easier for people who want to do this, so when I did some refactoring recently I made a separate package for just the FLAC decoding, with the Java interface improved, and put it into its own tarball with simplified instructions.

If you are interested, the website is https://klipspringer.avadeaux.net/ <https://klipspringer.avadeaux.net/> and the page specifically about the FLAC decoding package is https://klipspringer.avadeaux.net/guide/flac-decoding/ <https://klipspringer.avadeaux.net/guide/flac-decoding/>


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xiph.org/pipermail/flac-dev/attachments/20230412/0d8c15ac/attachment.htm>

More information about the flac-dev mailing list