From 236dc966894cb80aaaabd5ed2cc9055942411eae Mon Sep 17 00:00:00 2001 From: RipleyTom Date: Sat, 14 Feb 2026 11:57:12 +0100 Subject: [PATCH] Microphone fixes --- rpcs3/Emu/Cell/Modules/cellMic.cpp | 2 +- rpcs3/Emu/Cell/Modules/cellMic.h | 2 +- rpcs3/Emu/Cell/lv2/sys_usbd.cpp | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/rpcs3/Emu/Cell/Modules/cellMic.cpp b/rpcs3/Emu/Cell/Modules/cellMic.cpp index 0724b48927..0c58d2ec7e 100644 --- a/rpcs3/Emu/Cell/Modules/cellMic.cpp +++ b/rpcs3/Emu/Cell/Modules/cellMic.cpp @@ -634,7 +634,7 @@ u32 microphone_device::capture_audio() if (ALCenum err = alcGetError(micdevice.device); err != ALC_NO_ERROR) { cellMic.error("Error getting number of captured samples of device '%s' (error=%s)", micdevice.name, fmt::alc_error{micdevice.device, err}); - return CELL_MICIN_ERROR_FATAL; + return 0; } num_samples = std::min(num_samples, samples_in); diff --git a/rpcs3/Emu/Cell/Modules/cellMic.h b/rpcs3/Emu/Cell/Modules/cellMic.h index 88a2f4d937..a07cec23a8 100644 --- a/rpcs3/Emu/Cell/Modules/cellMic.h +++ b/rpcs3/Emu/Cell/Modules/cellMic.h @@ -238,7 +238,7 @@ public: if (over_size > Size) { m_tail += (over_size - Size); - if (m_tail > Size) + if (m_tail >= Size) m_tail -= Size; m_used = Size; diff --git a/rpcs3/Emu/Cell/lv2/sys_usbd.cpp b/rpcs3/Emu/Cell/lv2/sys_usbd.cpp index 64f27227d3..e1c3caf9d7 100644 --- a/rpcs3/Emu/Cell/lv2/sys_usbd.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_usbd.cpp @@ -556,6 +556,8 @@ usb_handler_thread::usb_handler_thread() switch (g_cfg.audio.microphone_type) { + case microphone_handler::null: + break; case microphone_handler::standard: usb_devices.push_back(std::make_shared(0, get_new_location(), MicType::Logitech)); break;