Check for ogg support in SDL_mixer and show warning
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
widelands |
Fix Released
|
Low
|
Unassigned |
Bug Description
As mentioned on the forums [1], SDL_mixer loads libvorbis and libogg dynamically therefore those two libraries are neither required during compilation nur during runtime. However the error messages shown are missleading, as Widelands behaves as if there was no music/ sound files to play.
I therefore suggest to either treat this in the build environment and check for those two libraries (but the compilation system is not always the same as the System Widelands is finally run on) or to improve the code that initializes the sound system.
Ideally it would --disable-fx and --disable-music, grey out the music and sound checkboxes in the options menu and show a warning (either on the terminal or as short message in the options menu) that libogg and/or libvorbis are missing.
Related branches
- Widelands Developers: Pending requested
-
Diff: 111 lines (+48/-21)2 files modifiedsrc/sound/sound_handler.cc (+45/-21)
src/sound/sound_handler.h (+3/-0)
Changed in widelands: | |
status: | Expired → In Progress |
assignee: | nobody → SirVer (sirver) |
milestone: | none → build19-rc1 |
tags: |
added: sounds removed: sound |
Changed in widelands: | |
status: | Fix Committed → Fix Released |
If SDL_Mixer gives us error code back (i didn't check), a simple check could be to play a .ogg file at zero sound level and see if it fails on initialization. Adding searches for vorbis and/or ogg to our cmake files feels like a bandaid to me.