2022-04-23 20:49:07 +02:00
|
|
|
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
|
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
2020-12-28 16:15:37 +01:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <memory>
|
|
|
|
#include <QWidget>
|
|
|
|
|
2021-10-09 02:29:53 +02:00
|
|
|
namespace Core {
|
|
|
|
class System;
|
|
|
|
}
|
|
|
|
|
2020-12-28 16:15:37 +01:00
|
|
|
namespace ConfigurationShared {
|
|
|
|
enum class CheckState;
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace Ui {
|
|
|
|
class ConfigureAudio;
|
|
|
|
}
|
|
|
|
|
|
|
|
class ConfigureAudio : public QWidget {
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2021-10-09 02:29:53 +02:00
|
|
|
explicit ConfigureAudio(const Core::System& system_, QWidget* parent = nullptr);
|
2020-12-28 16:15:37 +01:00
|
|
|
~ConfigureAudio() override;
|
|
|
|
|
|
|
|
void ApplyConfiguration();
|
2021-10-09 02:29:53 +02:00
|
|
|
void SetConfiguration();
|
2020-12-28 16:15:37 +01:00
|
|
|
|
|
|
|
private:
|
|
|
|
void changeEvent(QEvent* event) override;
|
|
|
|
|
|
|
|
void InitializeAudioOutputSinkComboBox();
|
|
|
|
|
|
|
|
void RetranslateUI();
|
|
|
|
|
|
|
|
void UpdateAudioDevices(int sink_index);
|
|
|
|
|
|
|
|
void SetOutputSinkFromSinkID();
|
|
|
|
void SetAudioDeviceFromDeviceID();
|
|
|
|
void SetVolumeIndicatorText(int percentage);
|
|
|
|
|
|
|
|
void SetupPerGameUI();
|
|
|
|
|
|
|
|
std::unique_ptr<Ui::ConfigureAudio> ui;
|
2021-10-09 02:29:53 +02:00
|
|
|
|
|
|
|
const Core::System& system;
|
2020-12-28 16:15:37 +01:00
|
|
|
};
|