summaryrefslogtreecommitdiff
path: root/src/core/hle
diff options
context:
space:
mode:
authorGravatar Lioncash2022-09-14 03:32:14 -0400
committerGravatar Lioncash2022-09-15 09:03:40 -0400
commit1c7dae966d52287ba5812c27d2fe0c59938aa416 (patch)
tree35709e02b9e5c0ef33f3bac4dadfb8bb3e8e3baf /src/core/hle
parentMerge pull request #8880 from german77/slow-moving (diff)
downloadyuzu-1c7dae966d52287ba5812c27d2fe0c59938aa416.tar.gz
yuzu-1c7dae966d52287ba5812c27d2fe0c59938aa416.tar.xz
yuzu-1c7dae966d52287ba5812c27d2fe0c59938aa416.zip
audio_device: Make AudioDeviceName constructor constexpr
These are used as read-only arrays, so we can make the data read-only and available at compile-time. Now constructing an AudioDevice no longer needs to initialize some tables
Diffstat (limited to 'src/core/hle')
-rw-r--r--src/core/hle/service/audio/audout_u.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/core/hle/service/audio/audout_u.cpp b/src/core/hle/service/audio/audout_u.cpp
index a44dd842a..49c092301 100644
--- a/src/core/hle/service/audio/audout_u.cpp
+++ b/src/core/hle/service/audio/audout_u.cpp
@@ -246,9 +246,8 @@ void AudOutU::ListAudioOuts(Kernel::HLERequestContext& ctx) {
246 const auto write_count = 246 const auto write_count =
247 static_cast<u32>(ctx.GetWriteBufferSize() / sizeof(AudioDevice::AudioDeviceName)); 247 static_cast<u32>(ctx.GetWriteBufferSize() / sizeof(AudioDevice::AudioDeviceName));
248 std::vector<AudioDevice::AudioDeviceName> device_names{}; 248 std::vector<AudioDevice::AudioDeviceName> device_names{};
249 std::string print_names{};
250 if (write_count > 0) { 249 if (write_count > 0) {
251 device_names.push_back(AudioDevice::AudioDeviceName("DeviceOut")); 250 device_names.emplace_back("DeviceOut");
252 LOG_DEBUG(Service_Audio, "called. \nName=DeviceOut"); 251 LOG_DEBUG(Service_Audio, "called. \nName=DeviceOut");
253 } else { 252 } else {
254 LOG_DEBUG(Service_Audio, "called. Empty buffer passed in."); 253 LOG_DEBUG(Service_Audio, "called. Empty buffer passed in.");