goxr3plus / goxr3plus/java-stream-player
seekSeconds doesn't work for flac files
- Dominant language
- Java
- Stars
- 158
- Forks
- 36
- PR merge metrics
- No merged PRs in 30d
Description
I have just tried a little, but it seems that seekSeconds doesn't work if the audio file is a flac file.
https://github.com/goxr3plus/java-stream-player/blob/634c9912c38437285faf5644b4046bb5546db597/src/main/java/com/goxr3plus/streamplayer/stream/StreamPlayer.java#L715-L727
Part of the problem is in TimeTool.durationInMilliseconds_Part2(), where the value on line 110 fall through if the file extension is not mp3, wav or ogg.
https://github.com/goxr3plus/java-stream-player/blob/634c9912c38437285faf5644b4046bb5546db597/src/main/java/com/goxr3plus/streamplayer/tools/TimeTool.java#L117-L120
This leads to an exception.
UnsupportedOperationException: Trying to skip with seconds {15} > maximum {-1}
If this value is changed to 1000000 (1000 seconds), this exception doesn't happen.
But the seek still doesn't happen.
That's as far as I have investigated.
See also https://github.com/HelgeStenstrom/java-stream-player/tree/appWithFlac
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.