1//============================================================================
2//
3// SSSS tt lll lll
4// SS SS tt ll ll
5// SS tttttt eeee ll ll aaaa
6// SSSS tt ee ee ll ll aa
7// SS tt eeeeee ll ll aaaaa -- "An Atari 2600 VCS Emulator"
8// SS SS tt ee ll ll aa aa
9// SSSS ttt eeeee llll llll aaaaa
10//
11// Copyright (c) 1995-2019 by Bradford W. Mott, Stephen Anthony
12// and the Stella Team
13//
14// See the file "License.txt" for information on usage and redistribution of
15// this file, and for a DISCLAIMER OF ALL WARRANTIES.
16//============================================================================
17
18#ifndef AUDIO_DIALOG_HXX
19#define AUDIO_DIALOG_HXX
20
21class CommandSender;
22class Dialog;
23class DialogContainer;
24class PopUpWidget;
25class SliderWidget;
26class StaticTextWidget;
27class CheckboxWidget;
28class OSystem;
29class AudioSettings;
30
31#include "bspf.hxx"
32
33class AudioDialog : public Dialog
34{
35 public:
36 AudioDialog(OSystem& osystem, DialogContainer& parent, const GUI::Font& font);
37 virtual ~AudioDialog() = default;
38
39 private:
40 void loadConfig() override;
41 void saveConfig() override;
42 void setDefaults() override;
43
44 void updatePreset();
45 void updateEnabledState();
46 void updateSettingsWithPreset(AudioSettings&);
47 void handleCommand(CommandSender* sender, int cmd, int data, int id) override;
48
49 private:
50 enum {
51 kSoundEnableChanged = 'ADse',
52 kModeChanged = 'ADmc',
53 kHeadroomChanged = 'ADhc',
54 kBufferSizeChanged = 'ADbc'
55 };
56
57 CheckboxWidget* mySoundEnableCheckbox;
58 SliderWidget* myVolumeSlider;
59 CheckboxWidget* myStereoSoundCheckbox;
60 PopUpWidget* myModePopup;
61 PopUpWidget* myFragsizePopup;
62 PopUpWidget* myFreqPopup;
63 PopUpWidget* myResamplingPopup;
64 SliderWidget* myHeadroomSlider;
65 SliderWidget* myBufferSizeSlider;
66 SliderWidget* myDpcPitch;
67
68 private:
69 // Following constructors and assignment operators not supported
70 AudioDialog() = delete;
71 AudioDialog(const AudioDialog&) = delete;
72 AudioDialog(AudioDialog&&) = delete;
73 AudioDialog& operator=(const AudioDialog&) = delete;
74 AudioDialog& operator=(AudioDialog&&) = delete;
75};
76
77#endif
78