mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-17 08:11:51 +00:00
Microphone enumeration: warn user if ALC_ENUMERATION_EXT is missing.
This commit is contained in:
parent
2a32ded575
commit
f398f1113d
@ -1,3 +1,4 @@
|
||||
#include "stdafx.h"
|
||||
#include "microphone_creator.h"
|
||||
|
||||
#include "Utilities/StrFmt.h"
|
||||
@ -5,7 +6,7 @@
|
||||
|
||||
#include "3rdparty/OpenAL/include/alext.h"
|
||||
|
||||
constexpr auto qstr = QString::fromStdString;
|
||||
LOG_CHANNEL(cfg_log, "CFG");
|
||||
|
||||
microphone_creator::microphone_creator()
|
||||
{
|
||||
@ -25,11 +26,11 @@ void microphone_creator::refresh_list()
|
||||
|
||||
if (alcIsExtensionPresent(nullptr, "ALC_ENUMERATION_EXT") == AL_TRUE)
|
||||
{
|
||||
if (const char* devices = alcGetString(nullptr, ALC_CAPTURE_DEVICE_SPECIFIER); devices != nullptr)
|
||||
if (const char* devices = alcGetString(nullptr, ALC_CAPTURE_DEVICE_SPECIFIER))
|
||||
{
|
||||
while (*devices != 0)
|
||||
{
|
||||
m_microphone_list.append(qstr(devices));
|
||||
m_microphone_list.append(devices);
|
||||
devices += strlen(devices) + 1;
|
||||
}
|
||||
}
|
||||
@ -37,9 +38,11 @@ void microphone_creator::refresh_list()
|
||||
else
|
||||
{
|
||||
// Without enumeration we can only use one device
|
||||
if (const char* device = alcGetString(nullptr, ALC_DEFAULT_DEVICE_SPECIFIER); device != nullptr)
|
||||
cfg_log.error("OpenAl extension ALC_ENUMERATION_EXT not supported. The microphone list will only contain the default microphone.");
|
||||
|
||||
if (const char* device = alcGetString(nullptr, ALC_DEFAULT_DEVICE_SPECIFIER))
|
||||
{
|
||||
m_microphone_list.append(qstr(device));
|
||||
m_microphone_list.append(device);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user