2022-04-23 04:59:50 -04:00
|
|
|
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
|
|
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
2018-07-30 23:57:53 -04:00
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <memory>
|
|
|
|
|
#include <QWidget>
|
2020-07-14 15:42:12 -04:00
|
|
|
|
2021-09-02 21:40:55 -04:00
|
|
|
namespace Core {
|
|
|
|
|
class System;
|
|
|
|
|
}
|
|
|
|
|
|
2020-07-14 15:42:12 -04:00
|
|
|
namespace ConfigurationShared {
|
|
|
|
|
enum class CheckState;
|
|
|
|
|
}
|
2018-07-30 23:57:53 -04:00
|
|
|
|
|
|
|
|
namespace Ui {
|
|
|
|
|
class ConfigureAudio;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class ConfigureAudio : public QWidget {
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
public:
|
2021-07-30 10:07:32 -04:00
|
|
|
explicit ConfigureAudio(const Core::System& system_, QWidget* parent = nullptr);
|
2018-12-02 14:10:28 -05:00
|
|
|
~ConfigureAudio() override;
|
2018-07-30 23:57:53 -04:00
|
|
|
|
2019-05-26 00:39:23 -04:00
|
|
|
void ApplyConfiguration();
|
2021-09-02 21:40:55 -04:00
|
|
|
void SetConfiguration();
|
2018-07-30 23:57:53 -04:00
|
|
|
|
2018-12-02 14:14:32 -05:00
|
|
|
private:
|
2019-06-05 18:39:46 -04:00
|
|
|
void changeEvent(QEvent* event) override;
|
|
|
|
|
|
2022-07-16 23:48:45 +01:00
|
|
|
void InitializeAudioSinkComboBox();
|
2019-06-05 18:39:46 -04:00
|
|
|
|
|
|
|
|
void RetranslateUI();
|
|
|
|
|
|
2019-05-26 00:39:23 -04:00
|
|
|
void UpdateAudioDevices(int sink_index);
|
2018-07-30 23:57:53 -04:00
|
|
|
|
2019-05-26 00:39:23 -04:00
|
|
|
void SetOutputSinkFromSinkID();
|
2022-07-16 23:48:45 +01:00
|
|
|
void SetAudioDevicesFromDeviceID();
|
2019-05-26 00:39:23 -04:00
|
|
|
void SetVolumeIndicatorText(int percentage);
|
2018-07-30 23:57:53 -04:00
|
|
|
|
2020-07-09 22:42:09 -04:00
|
|
|
void SetupPerGameUI();
|
|
|
|
|
|
2018-07-30 23:57:53 -04:00
|
|
|
std::unique_ptr<Ui::ConfigureAudio> ui;
|
2021-09-02 21:40:55 -04:00
|
|
|
|
2021-07-30 10:07:32 -04:00
|
|
|
const Core::System& system;
|
2018-07-30 23:57:53 -04:00
|
|
|
};
|