Add unbound audio API selection choice.
[dcpomatic.git] / src / wx / config_dialog.h
index ce5df2c5b84b43badb59a4fbcee7cd77c8c3729f..c43d29ff7da25751125076dda1f1321856d520a7 100644 (file)
 
 */
 
+
 #ifndef DCPOMATIC_CONFIG_DIALOG_H
 #define DCPOMATIC_CONFIG_DIALOG_H
 
-#include "wx_util.h"
+
 #include "editable_list.h"
 #include "make_chain_dialog.h"
+#include "wx_util.h"
 #include "lib/config.h"
-#include "lib/ratio.h"
-#include "lib/filter.h"
+#include "lib/cross.h"
 #include "lib/dcp_content_type.h"
+#include "lib/exceptions.h"
+#include "lib/filter.h"
 #include "lib/log.h"
+#include "lib/ratio.h"
 #include "lib/util.h"
-#include "lib/cross.h"
-#include "lib/exceptions.h"
-#include "lib/warnings.h"
-#include <dcp/locale_convert.h>
-#include <dcp/exceptions.h>
 #include <dcp/certificate_chain.h>
-DCPOMATIC_DISABLE_WARNINGS
-#include <wx/stdpaths.h>
+#include <dcp/exceptions.h>
+#include <dcp/locale_convert.h>
+#include <dcp/warnings.h>
+LIBDCP_DISABLE_WARNINGS
+#include <wx/filepicker.h>
 #include <wx/preferences.h>
 #include <wx/spinctrl.h>
-#include <wx/filepicker.h>
-DCPOMATIC_ENABLE_WARNINGS
+#include <wx/stdpaths.h>
 #include <RtAudio.h>
+LIBDCP_ENABLE_WARNINGS
 #include <boost/filesystem.hpp>
-#include <iostream>
+
 
 class AudioMappingView;
+class CheckBox;
+class Choice;
+class FilmViewer;
+
 
 class Page : public wxPreferencesPage
 {
@@ -74,6 +80,7 @@ private:
        bool _window_exists;
 };
 
+
 class GeneralPage : public Page
 {
 public:
@@ -84,7 +91,7 @@ public:
 #ifdef DCPOMATIC_OSX
        wxBitmap GetLargeIcon () const override
        {
-               return wxBitmap(bitmap_path("general"), wxBITMAP_TYPE_PNG);
+               return wxBitmap(icon_path("general"), wxBITMAP_TYPE_PNG);
        }
 #endif
 
@@ -100,12 +107,13 @@ private:
        void check_for_updates_changed ();
        void check_for_test_updates_changed ();
 
-       wxCheckBox* _set_language;
+       CheckBox* _set_language;
        wxChoice* _language;
-       wxCheckBox* _check_for_updates;
-       wxCheckBox* _check_for_test_updates;
+       CheckBox* _check_for_updates;
+       CheckBox* _check_for_test_updates;
 };
 
+
 class CertificateChainEditor : public wxDialog
 {
 public:
@@ -161,7 +169,7 @@ public:
 #ifdef DCPOMATIC_OSX
        wxBitmap GetLargeIcon () const override
        {
-               return wxBitmap(bitmap_path("keys"), wxBITMAP_TYPE_PNG);
+               return wxBitmap(icon_path("keys"), wxBITMAP_TYPE_PNG);
        }
 #endif
 
@@ -183,8 +191,9 @@ private:
 class SoundPage : public Page
 {
 public:
-       SoundPage (wxSize panel_size, int border)
+       SoundPage(wxSize panel_size, int border, FilmViewer* viewer)
                : Page (panel_size, border)
+               , _viewer(viewer)
        {}
 
        wxString GetName() const override;
@@ -192,7 +201,7 @@ public:
 #ifdef DCPOMATIC_OSX
        wxBitmap GetLargeIcon () const override
        {
-               return wxBitmap(bitmap_path("sound"), wxBITMAP_TYPE_PNG);
+               return wxBitmap(icon_path("sound"), wxBITMAP_TYPE_PNG);
        }
 #endif
 
@@ -200,20 +209,24 @@ private:
 
        void setup () override;
        void config_changed () override;
-        boost::optional<std::string> get_sound_output ();
+        boost::optional<std::string> get_sound_api() const;
+        boost::optional<std::string> get_sound_output() const;
        void sound_changed ();
        void sound_output_changed ();
        void setup_sensitivity ();
        void map_changed (AudioMapping m);
        void reset_to_default ();
 
-       wxCheckBox* _sound;
+       CheckBox* _sound;
+       Choice* _sound_api;
        wxChoice* _sound_output;
        wxStaticText* _sound_output_details;
        AudioMappingView* _map;
        Button* _reset_to_default;
+       FilmViewer* _viewer;
 };
 
+
 class LocationsPage : public Page
 {
 public:
@@ -236,4 +249,5 @@ private:
        wxDirPickerCtrl* _playlist_directory;
        wxDirPickerCtrl* _kdm_directory;
 };
+
 #endif