diff options
author | liamwhite <liamwhite@users.noreply.github.com> | 2024-02-23 17:34:21 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-23 17:34:21 +0100 |
commit | 215e887be088ed572da999e9ec7fd8559198524b (patch) | |
tree | 793415b72d36bb07d0174dfcf731f81235008936 /src/audio_core/audio_in_manager.cpp | |
parent | Merge pull request #13073 from FearlessTobi/fsp-srv-ipc (diff) | |
parent | oboe_sink: handle temporary stream creation failure (diff) | |
download | yuzu-215e887be088ed572da999e9ec7fd8559198524b.tar yuzu-215e887be088ed572da999e9ec7fd8559198524b.tar.gz yuzu-215e887be088ed572da999e9ec7fd8559198524b.tar.bz2 yuzu-215e887be088ed572da999e9ec7fd8559198524b.tar.lz yuzu-215e887be088ed572da999e9ec7fd8559198524b.tar.xz yuzu-215e887be088ed572da999e9ec7fd8559198524b.tar.zst yuzu-215e887be088ed572da999e9ec7fd8559198524b.zip |
Diffstat (limited to 'src/audio_core/audio_in_manager.cpp')
-rw-r--r-- | src/audio_core/audio_in_manager.cpp | 7 |
1 files changed, 3 insertions, 4 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() { } } -u32 Manager::GetDeviceNames(std::vector<Renderer::AudioDevice::AudioDeviceName>& names, - [[maybe_unused]] const u32 max_count, +u32 Manager::GetDeviceNames(std::span<Renderer::AudioDevice::AudioDeviceName> names, [[maybe_unused]] const bool filter) { std::scoped_lock l{mutex}; LinkToManager(); auto input_devices{Sink::GetDeviceListForSink(Settings::values.sink_id.GetValue(), true)}; - if (input_devices.size() > 1) { - names.emplace_back("Uac"); + if (!input_devices.empty() && !names.empty()) { + names[0] = Renderer::AudioDevice::AudioDeviceName("Uac"); return 1; } return 0; |