pcsx2/pcsx2-qt/Settings/AudioSettingsWidget.h

51 lines
1.1 KiB
C
Raw Normal View History

2024-04-23 15:17:52 +00:00
// SPDX-FileCopyrightText: 2002-2024 PCSX2 Dev Team
// SPDX-License-Identifier: GPL-3.0+
#pragma once
2024-04-23 15:17:52 +00:00
#include "ui_AudioSettingsWidget.h"
#include "common/Pcsx2Defs.h"
#include <QtWidgets/QWidget>
2024-04-23 15:17:52 +00:00
enum class AudioBackend : u8;
enum class AudioExpansionMode : u8;
class SettingsWindow;
class AudioSettingsWidget : public QWidget
{
Q_OBJECT
public:
AudioSettingsWidget(SettingsWindow* dialog, QWidget* parent);
~AudioSettingsWidget();
2022-03-25 09:24:27 +00:00
private Q_SLOTS:
2024-04-23 15:17:52 +00:00
void onExpansionModeChanged();
void onSyncModeChanged();
2022-03-25 09:24:27 +00:00
2024-04-23 15:17:52 +00:00
void updateDriverNames();
void updateDeviceNames();
void updateLatencyLabel();
2023-01-01 12:46:07 +00:00
void updateVolumeLabel();
2024-04-23 15:17:52 +00:00
void onMinimalOutputLatencyChanged();
void onOutputVolumeChanged(int new_value);
void onFastForwardVolumeChanged(int new_value);
void onOutputMutedChanged(int new_state);
void onExpansionSettingsClicked();
void onStretchSettingsClicked();
private:
AudioBackend getEffectiveBackend() const;
AudioExpansionMode getEffectiveExpansionMode() const;
u32 getEffectiveExpansionBlockSize() const;
void resetVolume(bool fast_forward);
2023-01-01 12:46:07 +00:00
Ui::AudioSettingsWidget m_ui;
2024-04-23 15:17:52 +00:00
SettingsWindow* m_dialog;
2022-12-30 10:51:16 +00:00
u32 m_output_device_latency = 0;
};