MCPcopy Create free account
hub / github.com/NetHack/NetHack / play_sound_for_message

Function play_sound_for_message

src/sounds.c:1641–1656  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1639}
1640
1641void
1642play_sound_for_message(const char *msg)
1643{
1644 audio_mapping *snd;
1645
1646 /* we do this check here first, in order to completely
1647 * avoid doing the regex search when there won't be a
1648 * sound anyway, despite a match.
1649 */
1650 if (soundprocs.sound_play_usersound) {
1651 snd = sound_matches_message(msg);
1652 if (snd) {
1653 Play_usersound(snd->filename, snd->volume, snd->idx);
1654 }
1655 }
1656}
1657
1658void
1659maybe_play_sound(const char *msg)

Callers 3

onMSNHCommandFunction · 0.85
PutStrMethod · 0.85
onMSNHCommandFunction · 0.85

Calls 1

sound_matches_messageFunction · 0.85

Tested by

no test coverage detected