veandco / go-sdl2

SDL2 binding for Go
https://godoc.org/github.com/veandco/go-sdl2
BSD 3-Clause "New" or "Revised" License
2.22k stars 223 forks source link

All audio support are not available #348

Closed Chipsterjulien closed 6 years ago

Chipsterjulien commented 6 years ago

Hello I try this go audio example and i always have mp3 support are not available (same for all others formats)

all the sdl lib is installed

extra/sdl2 2.0.8-9 [installed]
extra/sdl2_gfx 1:1.0.4-1 [installed]
extra/sdl2_image 2.0.3-1 [installed]
extra/sdl2_mixer 2.0.2-2 [installed]
extra/sdl2_net 1:2.0.1-1 [installed]
extra/sdl2_ttf 2.0.14-1 [installed]
extra/smpeg 0.4.5-3 [installed]

Someone have an idea ?

veeableful commented 6 years ago

Hi @Chipsterjulien, could you try installing sdl2_mixer 2.0.1 and try again? According to the FAQs, that should fix it.

Chipsterjulien commented 6 years ago

I try to compile sdl2_mixer-2.0.1 with mp3 and ogg but mp3 don't work. Fortunately ogg is good. I did not look further. I think my flags were bad. Thx for your help

Best regards

gen2brain commented 6 years ago

@Chipsterjulien You can try with go build -tags static to use prepared libraries (prepared with libmpg123) where mp3 should just work.