| 1639 | } |
| 1640 | |
| 1641 | void |
| 1642 | play_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 | |
| 1658 | void |
| 1659 | maybe_play_sound(const char *msg) |
no test coverage detected