Merge pull request #8878 from Kelebek1/remove_pause
Remove pause callbacks from coretiming
This commit is contained in:
commit
e85bda5f31
15 changed files with 29 additions and 144 deletions
|
@ -22,9 +22,7 @@ SystemManager::SystemManager(Core::System& core_)
|
|||
thread_event{Core::Timing::CreateEvent(
|
||||
"AudioRendererSystemManager", [this](std::uintptr_t, s64 time, std::chrono::nanoseconds) {
|
||||
return ThreadFunc2(time);
|
||||
})} {
|
||||
core.CoreTiming().RegisterPauseCallback([this](bool paused) { PauseCallback(paused); });
|
||||
}
|
||||
})} {}
|
||||
|
||||
SystemManager::~SystemManager() {
|
||||
Stop();
|
||||
|
@ -125,11 +123,4 @@ std::optional<std::chrono::nanoseconds> SystemManager::ThreadFunc2(s64 time) {
|
|||
return std::nullopt;
|
||||
}
|
||||
|
||||
void SystemManager::PauseCallback(bool paused) {
|
||||
if (paused && core.IsPoweredOn() && core.IsShuttingDown()) {
|
||||
update.store(true);
|
||||
update.notify_all();
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace AudioCore::AudioRenderer
|
||||
|
|
|
@ -73,13 +73,6 @@ private:
|
|||
*/
|
||||
std::optional<std::chrono::nanoseconds> ThreadFunc2(s64 time);
|
||||
|
||||
/**
|
||||
* Callback from core timing when pausing, used to detect shutdowns and stop ThreadFunc.
|
||||
*
|
||||
* @param paused - Are we pausing or resuming?
|
||||
*/
|
||||
void PauseCallback(bool paused);
|
||||
|
||||
enum class StreamState {
|
||||
Filling,
|
||||
Steady,
|
||||
|
@ -106,8 +99,6 @@ private:
|
|||
std::shared_ptr<Core::Timing::EventType> thread_event;
|
||||
/// Atomic for main thread to wait on
|
||||
std::atomic<bool> update{};
|
||||
/// Current state of the streams
|
||||
StreamState state{StreamState::Filling};
|
||||
};
|
||||
|
||||
} // namespace AudioCore::AudioRenderer
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue