diff options
| author | Sepalani <sepalani@hotmail.fr> | 2026-07-26 22:52:42 +0400 |
|---|---|---|
| committer | Sepalani <sepalani@hotmail.fr> | 2026-07-28 00:02:10 +0400 |
| commit | 7a3ac130d7a1d49f013bb2da983a42513e9ca935 (patch) | |
| tree | 7ca8bd81a9aa456f75db4cb144b8e3f0f6a679b4 /Source/Core | |
| parent | 4f717050dad5a2b2538a7784e157109118ae63f4 (diff) | |
EXI_DeviceMic: Move members initialization to header file
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/Core/HW/EXI/EXI_DeviceMic.cpp | 11 | ||||
| -rw-r--r-- | Source/Core/Core/HW/EXI/EXI_DeviceMic.h | 14 |
2 files changed, 7 insertions, 18 deletions
diff --git a/Source/Core/Core/HW/EXI/EXI_DeviceMic.cpp b/Source/Core/Core/HW/EXI/EXI_DeviceMic.cpp index 60bede8375..8df1171322 100644 --- a/Source/Core/Core/HW/EXI/EXI_DeviceMic.cpp +++ b/Source/Core/Core/HW/EXI/EXI_DeviceMic.cpp @@ -186,17 +186,6 @@ CEXIMic::CEXIMic(Core::System& system, int index) m_work_queue("Mic Worker") #endif { - m_position = 0; - command = 0; - - sample_rate = RATE_BASE; - buff_size = RING_BASE; - buff_size_samples = buff_size / SAMPLE_SIZE; - - ring_pos = 0; - - next_int_ticks = 0; - #ifdef _WIN32 m_work_queue.PushBlocking([this] { auto result = ::CoInitializeEx(nullptr, COINIT_MULTITHREADED | COINIT_DISABLE_OLE1DDE); diff --git a/Source/Core/Core/HW/EXI/EXI_DeviceMic.h b/Source/Core/Core/HW/EXI/EXI_DeviceMic.h index 4451b0e052..5aa1c7a3d5 100644 --- a/Source/Core/Core/HW/EXI/EXI_DeviceMic.h +++ b/Source/Core/Core/HW/EXI/EXI_DeviceMic.h @@ -41,8 +41,8 @@ private: int slot; - u32 m_position; - int command; + u32 m_position = 0; + int command = 0; struct Status { u16 out : 4; // MICSet/GetOut...??? @@ -68,12 +68,12 @@ private: void StreamReadOne(); // 64 is the max size, can be 16 or 32 as well - int ring_pos; + int ring_pos = 0; std::array<u8, 64 * SAMPLE_SIZE> ring_buffer{}; // 0 to disable interrupts, else it will be checked against current CPU ticks // to determine if interrupt should be raised - u64 next_int_ticks; + u64 next_int_ticks = 0; void UpdateNextInterruptTicks(); // Streaming input interface @@ -85,9 +85,9 @@ private: std::mutex ring_lock; // status bits converted to nice numbers - int sample_rate; - int buff_size; - int buff_size_samples; + int sample_rate = RATE_BASE; + int buff_size = RING_BASE; + int buff_size_samples = buff_size / SAMPLE_SIZE; // Arbitrarily small ringbuffer used by audio input backend in order to // keep delay tolerable |
