core: Eliminate more uses of Core::System::GetInstance(). (#7313)

This commit is contained in:
Steveice10
2024-01-05 12:07:28 -08:00
committed by GitHub
parent 8e2037b3ff
commit f2ee9baec7
47 changed files with 416 additions and 387 deletions

View File

@@ -135,7 +135,7 @@ private:
};
struct MIC_U::Impl {
explicit Impl(Core::System& system) : timing(system.CoreTiming()) {
explicit Impl(Core::System& system) : system(system), timing(system.CoreTiming()) {
buffer_full_event =
system.Kernel().CreateEvent(Kernel::ResetType::OneShot, "MIC_U::buffer_full_event");
buffer_write_event = timing.RegisterEvent(
@@ -376,7 +376,7 @@ struct MIC_U::Impl {
}
mic = AudioCore::GetInputDetails(Settings::values.input_type.GetValue())
.create_input(Settings::values.input_device.GetValue());
.create_input(system, Settings::values.input_device.GetValue());
if (was_sampling) {
StartSampling();
}
@@ -392,6 +392,7 @@ struct MIC_U::Impl {
bool allow_shell_closed = false;
bool clamp = false;
std::unique_ptr<AudioCore::Input> mic;
Core::System& system;
Core::Timing& timing;
State state{};
Encoding encoding{};