MCPcopy Create free account
hub / github.com/OpenLoco/OpenLoco / destroy

Function destroy

src/Audio/src/AudioEngine.cpp:319–333  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

317 }
318
319 void destroy(AudioHandle handle)
320 {
321 auto* inst = getInstance(handle);
322 if (inst == nullptr)
323 {
324 return;
325 }
326 alSourceStop(inst->sourceId);
327 alSourcei(inst->sourceId, AL_BUFFER, 0);
328 if (_reverbAvailable)
329 {
330 alSource3i(inst->sourceId, AL_AUXILIARY_SEND_FILTER, AL_EFFECTSLOT_NULL, 0, AL_FILTER_NULL);
331 }
332 inst->active = false;
333 }
334
335 // Playback control
336

Callers

nothing calls this directly

Calls 1

getInstanceFunction · 0.85

Tested by

no test coverage detected