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

Function fmod_play_usersound

sound/fmod/fmod.c:74–87  ·  view source on GitHub ↗

fulfill SOUND_TRIGGER_USERSOUNDS */

Source from the content-addressed store, hash-verified

72
73/* fulfill SOUND_TRIGGER_USERSOUNDS */
74static void
75fmod_play_usersound(char *filename, int32_t volume UNUSED, int32_t idx UNUSED)
76{
77 FMOD_System_CreateSound(systemvar, filename, FMOD_CREATESAMPLE, 0,
78 &soundvar);
79 if (strstr(filename, "music_") != NULL) {
80 FMOD_Channel_Stop(channelMus);
81 FMOD_System_PlaySound(systemvar, soundvar, 0, 0, &channelMus);
82 FMOD_Channel_SetMode(channelMus, FMOD_LOOP_NORMAL);
83 } else {
84 FMOD_Channel_Stop(channel1);
85 FMOD_System_PlaySound(systemvar, soundvar, 0, 0, &channel1);
86 }
87}
88
89static void
90fmod_ambience(int32_t ambienceid, int32_t ambience_action,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected