MCPcopy Create free account
hub / github.com/atraczyk/2d-engine / PlaySfx

Method PlaySfx

engine/src/sound.cpp:61–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59}
60
61void Sound::PlaySfx(SOUND_ID sound_id)
62{
63#if defined(USE_FMOD)
64 if (sound_id == SOUND_STOMP)
65 {
66 if (cantPlaySfxSound)
67 return;
68 else
69 cantPlaySfxSound = 2;
70 }
71 system->playSound(FMOD_CHANNEL_FREE, sounds[sound_id], true, &sfxChannel);
72 sfxChannel->setVolume(masterVolume * sfxVolume);
73 sfxChannel->setPaused(false);
74#endif
75}
76
77void Sound::PlayGUISfx(SOUND_ID sound_id)
78{

Callers 5

I_updateGameInputFunction · 0.80
HitMethod · 0.80
updateMethod · 0.80
resolveTileCollisionsMethod · 0.80
resolveItemCollisionsMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected