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

Function isPlaying

src/Audio/src/AudioEngine.cpp:373–383  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

371 }
372
373 bool isPlaying(AudioHandle handle)
374 {
375 auto* inst = getInstance(handle);
376 if (inst == nullptr)
377 {
378 return false;
379 }
380 int32_t state = 0;
381 alGetSourcei(inst->sourceId, AL_SOURCE_STATE, &state);
382 return state == AL_PLAYING;
383 }
384
385 bool isPaused(AudioHandle handle)
386 {

Callers 3

playBackgroundMusicFunction · 0.85
pauseMusicFunction · 0.85
updateAmbientNoiseFunction · 0.85

Calls 1

getInstanceFunction · 0.85

Tested by

no test coverage detected