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

Function toggleSound

src/OpenLoco/src/Audio/Audio.cpp:320–332  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

318 }
319
320 void toggleSound()
321 {
322 _audioIsEnabled = !_audioIsEnabled;
323 if (_audioIsEnabled)
324 {
325 return;
326 }
327
328 stopVehicleNoise();
329 stopAmbientNoise();
330 stopMusic();
331 Config::write();
332 }
333
334 void pauseSound()
335 {

Callers 2

audioMenuDropdownFunction · 0.85
audioMenuDropdownFunction · 0.85

Calls 4

stopVehicleNoiseFunction · 0.85
stopAmbientNoiseFunction · 0.85
writeFunction · 0.85
stopMusicFunction · 0.70

Tested by

no test coverage detected