java-stream-player icon indicating copy to clipboard operation
java-stream-player copied to clipboard

Supported file formats

Open HelgeStenstrom opened this issue 6 years ago • 5 comments

The description claims that java-stream-player supports ogg, flac, speex and other formats. How does that happen? I have searched for the word flac in the code, but haven't found it.

It would be good with a few small sample audio files in the supported formats. The files should be free to use, of course.

HelgeStenstrom avatar Sep 09 '19 16:09 HelgeStenstrom

You can try to play .flac and it plays :) But i don't think it supports any .flac you will add :) . Yes we need small samples for all audio formats .

goxr3plus avatar Sep 10 '19 08:09 goxr3plus

I haven't tested with flac, but I might have some file on my drive. But the question was: How does it happen? In other words: Where is the implementation of flac support? Which part of the software is aware of different audio file types?

HelgeStenstrom avatar Sep 10 '19 11:09 HelgeStenstrom

@HelgeStenstrom Tha's a nice question :) . Look how it works .

We have added https://github.com/goxr3plus/java-stream-player/blob/f1ba0e325218b46be15dcdd75a860ef886098de9/pom.xml#L107-L111

which gives as the ability to play .flac files . But how that attaches to our library right ? Well it downloads the .jar file which if you open has inside has the below :

image

From which java audio system understands which codec to use for .flac files . Actually i was reading about this in some old Java Tutorials .

goxr3plus avatar Sep 10 '19 11:09 goxr3plus

I saw that in the pom file, but I don't see where the jflac-codec is actually used. Maybe I didn't find it because the package name is different from the artifactId.

I'll have to test with a flac file someday.

HelgeStenstrom avatar Sep 10 '19 13:09 HelgeStenstrom

Maybe i add a special package called AudioTools which the user can use to retrieve audio data , duration , read .mp3 metadata etc . i have it in XR3Player but i should export it here .

goxr3plus avatar Sep 10 '19 13:09 goxr3plus