// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #pragma once #include #include #include #include #include "yuzu/configuration/configuration_shared.h" #include "yuzu/configuration/shared_translation.h" class QComboBox; namespace Core { class System; } namespace Ui { class ConfigureAudio; } class ConfigureAudio : public ConfigurationShared::Tab { public: explicit ConfigureAudio( const Core::System& system_, std::shared_ptr> group, const ConfigurationShared::TranslationMap& translations_, const ConfigurationShared::ComboboxTranslationMap& combobox_translations_, QWidget* parent = nullptr); ~ConfigureAudio() override; void ApplyConfiguration() override; void SetConfiguration() override; private: void changeEvent(QEvent* event) override; void InitializeAudioSinkComboBox(); void RetranslateUI(); void UpdateAudioDevices(int sink_index); void SetOutputSinkFromSinkID(); void SetAudioDevicesFromDeviceID(); void Setup(); std::unique_ptr ui; const Core::System& system; const ConfigurationShared::TranslationMap& translations; const ConfigurationShared::ComboboxTranslationMap& combobox_translations; std::forward_list> apply_funcs{}; QComboBox* sink_combo_box; QComboBox* output_device_combo_box; QComboBox* input_device_combo_box; };