Microphone fixes
This commit is contained in:
@@ -634,7 +634,7 @@ u32 microphone_device::capture_audio()
|
|||||||
if (ALCenum err = alcGetError(micdevice.device); err != ALC_NO_ERROR)
|
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});
|
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);
|
num_samples = std::min<u32>(num_samples, samples_in);
|
||||||
|
|||||||
@@ -238,7 +238,7 @@ public:
|
|||||||
if (over_size > Size)
|
if (over_size > Size)
|
||||||
{
|
{
|
||||||
m_tail += (over_size - Size);
|
m_tail += (over_size - Size);
|
||||||
if (m_tail > Size)
|
if (m_tail >= Size)
|
||||||
m_tail -= Size;
|
m_tail -= Size;
|
||||||
|
|
||||||
m_used = Size;
|
m_used = Size;
|
||||||
|
|||||||
@@ -556,6 +556,8 @@ usb_handler_thread::usb_handler_thread()
|
|||||||
|
|
||||||
switch (g_cfg.audio.microphone_type)
|
switch (g_cfg.audio.microphone_type)
|
||||||
{
|
{
|
||||||
|
case microphone_handler::null:
|
||||||
|
break;
|
||||||
case microphone_handler::standard:
|
case microphone_handler::standard:
|
||||||
usb_devices.push_back(std::make_shared<usb_device_mic>(0, get_new_location(), MicType::Logitech));
|
usb_devices.push_back(std::make_shared<usb_device_mic>(0, get_new_location(), MicType::Logitech));
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user