Sitelet https://github.com/NetHack/NetHack/issues/1665
Skip to content

Porting enquiry: Can SND_SOUNDEFFECTS_AUTOMAP be used without USER_SOUNDS? #1665

Description

@JSI09

NetHack 5.0.0, NetHack-5.0 branch.

Context. I'm building a mobile window port of NetHack 5.0 for iOS and Android, with its sound library registered through struct sound_procs. I want to use the NetHack 5.0 built-in sound effects, so I define SND_SOUNDEFFECTS_AUTOMAP. I can't use the user-supplied sounds feature as the mobile app has no user-editable config file. I leave USER_SOUNDS undefined.

Observation. In sounds.c, get_sound_effect_filename() sits inside SND_SOUNDEFFECTS_AUTOMAP block and reads sounddir to build the default path which I'm looking to use. However, sounddir is declared inside USER_SOUNDS block further up the file, and the only other reference (extern in cfgfiles.c) is also inside the USER_SOUNDS guard.

With SND_SOUNDEFFECTS_AUTOMAP defined + USER_SOUNDS undefined, get_sound_effect_filename() references an identifier that doesn't exist, and the file won't compile. Maybe this combination hasn't come up? since other ports using the automapping also enable user sounds.

Q: Is SND_SOUNDEFFECTS_AUTOMAP intended to work independently of USER_SOUNDS, or are they expected to be enabled together?
The effect-name mapping appears to serve the built-in effects rather than the user-sounds feature, and the two are separately gated elsewhere, so I just wanted to check the intention.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions