diff options
author | Lioncash <mathew1800@gmail.com> | 2022-09-14 09:32:14 +0200 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2022-09-15 15:03:40 +0200 |
commit | 1c7dae966d52287ba5812c27d2fe0c59938aa416 (patch) | |
tree | 35709e02b9e5c0ef33f3bac4dadfb8bb3e8e3baf /src/audio_core/renderer/audio_device.h | |
parent | Merge pull request #8880 from german77/slow-moving (diff) | |
download | yuzu-1c7dae966d52287ba5812c27d2fe0c59938aa416.tar yuzu-1c7dae966d52287ba5812c27d2fe0c59938aa416.tar.gz yuzu-1c7dae966d52287ba5812c27d2fe0c59938aa416.tar.bz2 yuzu-1c7dae966d52287ba5812c27d2fe0c59938aa416.tar.lz yuzu-1c7dae966d52287ba5812c27d2fe0c59938aa416.tar.xz yuzu-1c7dae966d52287ba5812c27d2fe0c59938aa416.tar.zst yuzu-1c7dae966d52287ba5812c27d2fe0c59938aa416.zip |
Diffstat (limited to 'src/audio_core/renderer/audio_device.h')
-rw-r--r-- | src/audio_core/renderer/audio_device.h | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/src/audio_core/renderer/audio_device.h b/src/audio_core/renderer/audio_device.h index 1f449f261..ba1f4c748 100644 --- a/src/audio_core/renderer/audio_device.h +++ b/src/audio_core/renderer/audio_device.h @@ -3,7 +3,7 @@ #pragma once -#include <span> +#include <string_view> #include "audio_core/audio_render_manager.h" @@ -23,21 +23,13 @@ namespace AudioRenderer { class AudioDevice { public: struct AudioDeviceName { - std::array<char, 0x100> name; + std::array<char, 0x100> name{}; - AudioDeviceName(const char* name_) { - std::strncpy(name.data(), name_, name.size()); + constexpr AudioDeviceName(std::string_view name_) { + name_.copy(name.data(), name.size() - 1); } }; - std::array<AudioDeviceName, 4> usb_device_names{"AudioStereoJackOutput", - "AudioBuiltInSpeakerOutput", "AudioTvOutput", - "AudioUsbDeviceOutput"}; - std::array<AudioDeviceName, 3> device_names{"AudioStereoJackOutput", - "AudioBuiltInSpeakerOutput", "AudioTvOutput"}; - std::array<AudioDeviceName, 3> output_device_names{"AudioBuiltInSpeakerOutput", "AudioTvOutput", - "AudioExternalOutput"}; - explicit AudioDevice(Core::System& system, u64 applet_resource_user_id, u32 revision); /** |