Check for ogg support in SDL_mixer and show warning

Bug #1226137 reported by Nasenbaer
6
This bug affects 1 person
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.

[1] https://wl.widelands.org/forum/topic/1288/?page=2

Tags: sounds

Related branches

Revision history for this message
SirVer (sirver) wrote :

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.

Revision history for this message
SirVer (sirver) wrote :

Setting to incomplete for bug sweeping.

Changed in widelands:
status: Confirmed → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for widelands because there has been no activity for 60 days.]

Changed in widelands:
status: Incomplete → Expired
Revision history for this message
SirVer (sirver) wrote :

would be interesting to know if sdl2 has changed the dynamic loading to static linking.

Changed in widelands:
status: Expired → Confirmed
status: Confirmed → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for widelands because there has been no activity for 60 days.]

Changed in widelands:
status: Incomplete → Expired
SirVer (sirver)
Changed in widelands:
status: Expired → In Progress
assignee: nobody → SirVer (sirver)
milestone: none → build19-rc1
Revision history for this message
SirVer (sirver) wrote :

Fixed in r 7332.

Changed in widelands:
status: In Progress → Fix Committed
assignee: SirVer (sirver) → nobody
GunChleoc (gunchleoc)
tags: added: sounds
removed: sound
GunChleoc (gunchleoc)
Changed in widelands:
status: Fix Committed → Fix Released
Revision history for this message
GunChleoc (gunchleoc) wrote :

Fixed in build19-rc1.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.