diff options
author | Lioncash <mathew1800@gmail.com> | 2022-09-21 15:35:20 +0200 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2022-09-21 15:35:22 +0200 |
commit | 75d6fe3669c5fcbb437247c2c115f401ebb5c30e (patch) | |
tree | 9acd67a73c0e0e60cfd39d4586aeb6cfb0fb70e0 /src/audio_core/audio_manager.cpp | |
parent | audio_manager: move std::functions in SetOutManager/SetInManager (diff) | |
download | yuzu-75d6fe3669c5fcbb437247c2c115f401ebb5c30e.tar yuzu-75d6fe3669c5fcbb437247c2c115f401ebb5c30e.tar.gz yuzu-75d6fe3669c5fcbb437247c2c115f401ebb5c30e.tar.bz2 yuzu-75d6fe3669c5fcbb437247c2c115f401ebb5c30e.tar.lz yuzu-75d6fe3669c5fcbb437247c2c115f401ebb5c30e.tar.xz yuzu-75d6fe3669c5fcbb437247c2c115f401ebb5c30e.tar.zst yuzu-75d6fe3669c5fcbb437247c2c115f401ebb5c30e.zip |
Diffstat (limited to 'src/audio_core/audio_manager.cpp')
-rw-r--r-- | src/audio_core/audio_manager.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/audio_core/audio_manager.cpp b/src/audio_core/audio_manager.cpp index d101e6163..e23af0ef5 100644 --- a/src/audio_core/audio_manager.cpp +++ b/src/audio_core/audio_manager.cpp @@ -58,19 +58,21 @@ void AudioManager::ThreadFunc() { running = true; while (running) { - auto timed_out{events.Wait(l, std::chrono::seconds(2))}; + const auto timed_out{events.Wait(l, std::chrono::seconds(2))}; if (events.CheckAudioEventSet(Event::Type::Max)) { break; } for (size_t i = 0; i < buffer_events.size(); i++) { - if (events.CheckAudioEventSet(Event::Type(i)) || timed_out) { + const auto event_type = static_cast<Event::Type>(i); + + if (events.CheckAudioEventSet(event_type) || timed_out) { if (buffer_events[i]) { buffer_events[i](); } } - events.SetAudioEvent(Event::Type(i), false); + events.SetAudioEvent(event_type, false); } } } |