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

Function closeDevice

src/Audio/src/AudioEngine.cpp:159–180  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

157 }
158
159 void closeDevice()
160 {
161 if (_reverbAvailable)
162 {
163 alDeleteAuxiliaryEffectSlots(1, &_reverbSlot);
164 alDeleteEffects(1, &_reverbEffect);
165 _reverbSlot = 0;
166 _reverbEffect = 0;
167 _reverbAvailable = false;
168 }
169 if (_alcContext != nullptr)
170 {
171 alcMakeContextCurrent(nullptr);
172 alcDestroyContext(_alcContext);
173 _alcContext = nullptr;
174 }
175 if (_alcDevice != nullptr)
176 {
177 alcCloseDevice(_alcDevice);
178 _alcDevice = nullptr;
179 }
180 }
181
182 std::vector<std::string> getAvailableDevices()
183 {

Callers 2

openDeviceFunction · 0.85
shutdownFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected