summaryrefslogtreecommitdiff
path: root/src/wx/sound_preferences_page.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2025-03-02 12:19:40 +0100
committerCarl Hetherington <cth@carlh.net>2025-03-02 19:22:59 +0100
commit68a61d00f3754f6fc473f6ac86fb3abfe670d190 (patch)
treef68c4eca132739b1e9183ecdaf4a87c1e60de2a3 /src/wx/sound_preferences_page.h
parent5950dd7e8de1a50f6b22760ab8811239dacd84cb (diff)
Move Sound preferences to its own file.
Diffstat (limited to 'src/wx/sound_preferences_page.h')
-rw-r--r--src/wx/sound_preferences_page.h60
1 files changed, 60 insertions, 0 deletions
diff --git a/src/wx/sound_preferences_page.h b/src/wx/sound_preferences_page.h
new file mode 100644
index 000000000..47bba4c53
--- /dev/null
+++ b/src/wx/sound_preferences_page.h
@@ -0,0 +1,60 @@
+/*
+ Copyright (C) 2012-2018 Carl Hetherington <cth@carlh.net>
+
+ This file is part of DCP-o-matic.
+
+ DCP-o-matic is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ DCP-o-matic is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with DCP-o-matic. If not, see <http://www.gnu.org/licenses/>.
+
+*/
+
+
+#include "config_dialog.h"
+
+
+namespace dcpomatic {
+namespace preferences {
+
+
+class SoundPage : public Page
+{
+public:
+ SoundPage(wxSize panel_size, int border);
+
+ wxString GetName() const override;
+
+#ifdef DCPOMATIC_OSX
+ wxBitmap GetLargeIcon() const override;
+#endif
+
+private:
+ void setup() override;
+ void config_changed() override;
+ boost::optional<std::string> get_sound_output();
+ void sound_changed();
+ void sound_output_changed();
+ void setup_sensitivity();
+ void map_changed(AudioMapping m);
+ void reset_to_default();
+
+ CheckBox* _sound;
+ wxChoice* _sound_output;
+ wxStaticText* _sound_output_details;
+ AudioMappingView* _map;
+ Button* _reset_to_default;
+};
+
+
+}
+}
+