MCPcopy Create free account
hub / github.com/defold/defold / FinalizeOpenal

Method FinalizeOpenal

engine/sound/src/sound_openal.cpp:207–222  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

205 }
206
207 Result FinalizeOpenal() {
208 alDeleteSources(m_Sources.Capacity(), m_Sources.Begin());
209 checkForAlErrors("alDeleteSources");
210 alDeleteBuffers(m_Buffers.Size(), m_Buffers.Begin());
211 checkForAlErrors("alDeleteBuffers");
212 alcMakeContextCurrent(nullptr);
213 if (m_AlContext) {
214 alcDestroyContext(m_AlContext);
215 checkForAlcErrors(m_AlDevice, "alDestroyContext");
216 }
217 if (m_AlDevice) {
218 alcCloseDevice(m_AlDevice);
219 checkForAlErrors("alcCloseDevice");
220 }
221 return RESULT_OK;
222 }
223 };
224
225 SoundSystem* g_SoundSystem = 0;

Callers 2

SoundThreadFunction · 0.80
FinalizeFunction · 0.80

Calls 3

CapacityMethod · 0.45
BeginMethod · 0.45
SizeMethod · 0.45

Tested by

no test coverage detected