| 426 | } |
| 427 | |
| 428 | static void SoundThread(void* _args) |
| 429 | { |
| 430 | ThreadArgs* args = (ThreadArgs*)_args; |
| 431 | SoundSystem* sound = args->m_Sound; |
| 432 | |
| 433 | dmMutex::Lock(sound->m_Mutex); |
| 434 | Result result = InitializeInternal(sound, args); |
| 435 | if (result == RESULT_OK) |
| 436 | { |
| 437 | dmAtomicStore32(&sound->m_Status, (int)result); |
| 438 | |
| 439 | dmConditionVariable::Signal(sound->m_CondVar); |
| 440 | dmMutex::Unlock(sound->m_Mutex); |
| 441 | |
| 442 | emscripten_set_main_loop_arg(SoundThreadEmscriptenCallback, sound, 1000 / 16, 1); // roughly '60fps' |
| 443 | |
| 444 | dmMutex::Lock(sound->m_Mutex); |
| 445 | result = sound->FinalizeOpenal(); |
| 446 | } |
| 447 | |
| 448 | dmAtomicStore32(&sound->m_Status, (int)result); |
| 449 | dmConditionVariable::Signal(sound->m_CondVar); |
| 450 | dmMutex::Unlock(sound->m_Mutex); |
| 451 | } |
| 452 | #endif |
| 453 | |
| 454 | Result Initialize(dmConfigFile::HConfig config, const InitializeParams* params) |
nothing calls this directly
no test coverage detected