Devilutionx: Menu items don't make a sound in 0.5.0

Created on 27 Oct 2019  路  6Comments  路  Source: diasurgical/devilutionX

Describe the bug
When clicking on the menu items with the mouse or hitting the enter key, no sound is played. This worked previously on 0.4.0.

Expected behavior
Menu items should play the sound when clicked.

Additional context
devilutionX 0.5.0
macOS 10.14.6

Most helpful comment

Ok I found the actual cause of this issue, GetStatus didn't set dwStatus to 0 when the sound wasn't playing so since it was uninitialized it would just be whatever was randomly in that part of memory. On Mac this very consistently caused the monster to lack a death sound and for the menu not to play sounds, on Linux the effect was a bit more random.

All 6 comments

Odd, this appears to only be an issue for release builds, and possibly only for macOS. Could you try and build the latest master and see if the issue there is the same?

I just built master and the sounds for the menu items are working correctly.

Possibly related: The multiplayer game type menu only lists TCP and Loopback, but behaves as if UDP was there (i.e. down-arrow once, return sets up a UDP game, down-arrow twice and return selects Loopback.)

devilutionX 0.5.0
MacOS X 10.14.6

@flxs this was fixed in master soon after the 0.5.0 release. It's not related to the missing sound though.

@glebm this on is a bit odd, just adding SDL_Log("hello"); before calling UiPlayMoveSound made the sound work but adding it inside UiPlayMoveSound didn't change anything, so I'm not really sure what is going one here, my best guess would be some bad optimizations by the compiler?

Ok I found the actual cause of this issue, GetStatus didn't set dwStatus to 0 when the sound wasn't playing so since it was uninitialized it would just be whatever was randomly in that part of memory. On Mac this very consistently caused the monster to lack a death sound and for the menu not to play sounds, on Linux the effect was a bit more random.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pbekesky picture pbekesky  路  27Comments

Tmkrth picture Tmkrth  路  25Comments

AJenbo picture AJenbo  路  19Comments

mbreskovec picture mbreskovec  路  49Comments

snigel picture snigel  路  23Comments