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
This commit is contained in:
Lioncash
2022-09-14 03:32:14 -04:00
parent 1be456db83
commit 1c7dae966d
5 changed files with 30 additions and 17 deletions

View File

@ -82,7 +82,7 @@ u32 Manager::GetDeviceNames(std::vector<AudioRenderer::AudioDevice::AudioDeviceN
auto input_devices{Sink::GetDeviceListForSink(Settings::values.sink_id.GetValue(), true)};
if (input_devices.size() > 1) {
names.push_back(AudioRenderer::AudioDevice::AudioDeviceName("Uac"));
names.emplace_back("Uac");
return 1;
}
return 0;