diff options
Diffstat (limited to 'src/audio_core')
| -rw-r--r-- | src/audio_core/audio_in_manager.cpp | 7 | ||||
| -rw-r--r-- | src/audio_core/audio_in_manager.h | 4 |
2 files changed, 4 insertions, 7 deletions
diff --git a/src/audio_core/audio_in_manager.cpp b/src/audio_core/audio_in_manager.cpp index a3667524f..63b064922 100644 --- a/src/audio_core/audio_in_manager.cpp +++ b/src/audio_core/audio_in_manager.cpp | |||
| @@ -73,16 +73,15 @@ void Manager::BufferReleaseAndRegister() { | |||
| 73 | } | 73 | } |
| 74 | } | 74 | } |
| 75 | 75 | ||
| 76 | u32 Manager::GetDeviceNames(std::vector<Renderer::AudioDevice::AudioDeviceName>& names, | 76 | u32 Manager::GetDeviceNames(std::span<Renderer::AudioDevice::AudioDeviceName> names, |
| 77 | [[maybe_unused]] const u32 max_count, | ||
| 78 | [[maybe_unused]] const bool filter) { | 77 | [[maybe_unused]] const bool filter) { |
| 79 | std::scoped_lock l{mutex}; | 78 | std::scoped_lock l{mutex}; |
| 80 | 79 | ||
| 81 | LinkToManager(); | 80 | LinkToManager(); |
| 82 | 81 | ||
| 83 | auto input_devices{Sink::GetDeviceListForSink(Settings::values.sink_id.GetValue(), true)}; | 82 | auto input_devices{Sink::GetDeviceListForSink(Settings::values.sink_id.GetValue(), true)}; |
| 84 | if (input_devices.size() > 1) { | 83 | if (!input_devices.empty() && !names.empty()) { |
| 85 | names.emplace_back("Uac"); | 84 | names[0] = Renderer::AudioDevice::AudioDeviceName("Uac"); |
| 86 | return 1; | 85 | return 1; |
| 87 | } | 86 | } |
| 88 | return 0; | 87 | return 0; |
diff --git a/src/audio_core/audio_in_manager.h b/src/audio_core/audio_in_manager.h index 5c4614cd1..2179990e0 100644 --- a/src/audio_core/audio_in_manager.h +++ b/src/audio_core/audio_in_manager.h | |||
| @@ -60,13 +60,11 @@ public: | |||
| 60 | * Get a list of audio in device names. | 60 | * Get a list of audio in device names. |
| 61 | * | 61 | * |
| 62 | * @param names - Output container to write names to. | 62 | * @param names - Output container to write names to. |
| 63 | * @param max_count - Maximum number of device names to write. Unused | ||
| 64 | * @param filter - Should the list be filtered? Unused. | 63 | * @param filter - Should the list be filtered? Unused. |
| 65 | * | 64 | * |
| 66 | * @return Number of names written. | 65 | * @return Number of names written. |
| 67 | */ | 66 | */ |
| 68 | u32 GetDeviceNames(std::vector<Renderer::AudioDevice::AudioDeviceName>& names, u32 max_count, | 67 | u32 GetDeviceNames(std::span<Renderer::AudioDevice::AudioDeviceName> names, bool filter); |
| 69 | bool filter); | ||
| 70 | 68 | ||
| 71 | /// Core system | 69 | /// Core system |
| 72 | Core::System& system; | 70 | Core::System& system; |