Microphone fixes

This commit is contained in:
RipleyTom 2026-02-14 11:57:12 +01:00 committed by Elad
parent 7cfe96a1d1
commit 236dc96689
3 changed files with 4 additions and 2 deletions

View file

@ -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<u32>(num_samples, samples_in);

View file

@ -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;

View file

@ -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<usb_device_mic>(0, get_new_location(), MicType::Logitech));
break;