Open MarkKremer opened 1 year ago
I only see a few options. But there seems to a good mp3 library from the Ebiten project.
https://pkg.go.dev/github.com/hajimehoshi/ebiten/v2/audio/mp3
And this one
Unfortunately, the first link makes use of go-mp3 too.
The second link uses https://github.com/tcolgate/mp3 to parse mp3 frames, and only the frames. Encoding happens by calling the flac
command line tool.
@MarkKremer
Do we even need to support MP3? Are there not better alternatives? Hajime Hoshi is the original author of go-mp3 and the creater of Ebiten. Even he has confirmed he is going to remove mp3 support.
I wonder if its because of the lack of mp3 support in Go environment or there are better alternatives?
I think it is desirable to have MP3 support. From what I can find OGG Vorbis and Flac are both better formats than MP3 but I think Beep is used for more purposes than games and for e.g. a media player application you want to be able to open random file formats that are already in your collection. Non-programmers know what a MP3 file is.
MP3 seems to be a difficult format to implement. You have to buy the expensive spec, know a lot about audio processing and spend the time to implement it.
So if it isn't doable I think I'll very slowly drop support from Beep too. But if there are alternatives that would be great.
@MarkKremer mpg123 and tosone/minimp3 are alternatives that you can use. Minimp3 seems to be significantly better than go-mp3 anyways.
The go-mp3 library that Beep uses is no longer being maintained.
If you know a good alternatives, please share! :)
If that implementation happens to support encoding as well as decoding, even better! (I think a license is no longer needed question mark?)