summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinQt/Settings/AudioPane.h
blob: 5938e4caa7401585c4624f81c2203bebc0c2635b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
// Copyright 2017 Dolphin Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later

#pragma once

#include <array>

#include <QWidget>

namespace AudioCommon
{
enum class DPL2Quality;
}

class ConfigBool;
class ConfigChoice;
class ConfigComplexChoice;
class ConfigRadioBool;
class ConfigSlider;
class ConfigStringChoice;
class QGroupBox;
class QHBoxLayout;
class QLabel;
class QRadioButton;
class SettingsWindow;
class ConfigBool;

class AudioPane final : public QWidget
{
  Q_OBJECT
public:
  explicit AudioPane();

private:
  void CreateWidgets();
  void ConnectWidgets();
  void AddDescriptions();

  void OnEmulationStateChanged(bool running);
  void OnBackendChanged();
  void OnDspChanged();

  void UpdateWiimoteRoutingEnabled();

  void CheckNeedForLatencyControl();
  bool m_latency_control_supported;

  QHBoxLayout* m_main_layout;

  // DSP Engine
  ConfigComplexChoice* m_dsp_combo;

  // Volume
  ConfigSlider* m_volume_slider;
  QLabel* m_volume_indicator;

  // Backend
  QLabel* m_backend_label;
  ConfigStringChoice* m_backend_combo;

  ConfigBool* m_dolby_pro_logic;
  QLabel* m_dolby_quality_label;
  ConfigChoice* m_dolby_quality_combo;

  QLabel* m_latency_label;
  ConfigSlider* m_latency_slider;
#ifdef _WIN32
  QLabel* m_wasapi_device_label;
  ConfigStringChoice* m_wasapi_device_combo;
#endif

  // Misc Settings
  ConfigBool* m_audio_fill_gaps;
  ConfigBool* m_audio_preserve_pitch;
  ConfigBool* m_speed_up_mute_enable;

  // Wiimote Audio Routing
  QGroupBox* m_wiimote_routing_box = nullptr;
  ConfigBool* m_wiimote_routing_enable = nullptr;
  std::array<ConfigBool*, 4> m_wiimote_output_enable{};
  std::array<ConfigStringChoice*, 4> m_wiimote_output_device{};
};