mirror of
https://github.com/cemu-project/Cemu.git
synced 2024-11-26 02:54:17 +01:00
Cubeb: Add a default device to the selection (#1017)
This commit is contained in:
parent
ca01e923bf
commit
81acd80a97
@ -188,7 +188,12 @@ std::vector<IAudioAPI::DeviceDescriptionPtr> CubebAPI::GetDevices()
|
|||||||
return {};
|
return {};
|
||||||
|
|
||||||
std::vector<DeviceDescriptionPtr> result;
|
std::vector<DeviceDescriptionPtr> result;
|
||||||
result.reserve(devices.count);
|
result.reserve(devices.count + 1); // Reserve space for the default device
|
||||||
|
|
||||||
|
// Add the default device to the list
|
||||||
|
auto defaultDevice = std::make_shared<CubebDeviceDescription>(nullptr, "default", L"Default Device");
|
||||||
|
result.emplace_back(defaultDevice);
|
||||||
|
|
||||||
for (size_t i = 0; i < devices.count; ++i)
|
for (size_t i = 0; i < devices.count; ++i)
|
||||||
{
|
{
|
||||||
// const auto& device = devices.device[i];
|
// const auto& device = devices.device[i];
|
||||||
|
@ -180,7 +180,12 @@ std::vector<IAudioInputAPI::DeviceDescriptionPtr> CubebInputAPI::GetDevices()
|
|||||||
return {};
|
return {};
|
||||||
|
|
||||||
std::vector<DeviceDescriptionPtr> result;
|
std::vector<DeviceDescriptionPtr> result;
|
||||||
result.reserve(devices.count);
|
result.reserve(devices.count + 1); // Reserve space for the default device
|
||||||
|
|
||||||
|
// Add the default device to the list
|
||||||
|
auto defaultDevice = std::make_shared<CubebDeviceDescription>(nullptr, "default", L"Default Device");
|
||||||
|
result.emplace_back(defaultDevice);
|
||||||
|
|
||||||
for (size_t i = 0; i < devices.count; ++i)
|
for (size_t i = 0; i < devices.count; ++i)
|
||||||
{
|
{
|
||||||
// const auto& device = devices.device[i];
|
// const auto& device = devices.device[i];
|
||||||
|
Loading…
Reference in New Issue
Block a user