Change bitmap_path to take a full name with extension.
[dcpomatic.git] / src / wx / full_config_dialog.cc
index 127ca412973ba10800248d7cf9ad4b60d96afc26..bb804cae876c837951e387db26de934118c5a9be 100644 (file)
 #include "nag_dialog.h"
 #include "name_format_editor.h"
 #include "password_entry.h"
+#include "send_test_email_dialog.h"
 #include "server_dialog.h"
 #include "static_text.h"
 #include "wx_util.h"
 #include "lib/config.h"
 #include "lib/cross.h"
 #include "lib/dcp_content_type.h"
+#include "lib/emailer.h"
 #include "lib/exceptions.h"
 #include "lib/filter.h"
 #include "lib/log.h"
 #include <dcp/certificate_chain.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/stdpaths.h>
+LIBDCP_ENABLE_WARNINGS
 #include <RtAudio.h>
 #include <boost/filesystem.hpp>
 #include <iostream>
@@ -87,7 +92,7 @@ public:
        {}
 
 private:
-       void setup ()
+       void setup () override
        {
                auto table = new wxGridBagSizer (DCPOMATIC_SIZER_X_GAP, DCPOMATIC_SIZER_Y_GAP);
                _panel->GetSizer()->Add (table, 1, wxALL | wxEXPAND, _border);
@@ -144,7 +149,7 @@ private:
                _automatic_audio_analysis->Bind (wxEVT_CHECKBOX, boost::bind (&FullGeneralPage::automatic_audio_analysis_changed, this));
        }
 
-       void config_changed ()
+       void config_changed () override
        {
                auto config = Config::instance ();
 
@@ -244,20 +249,20 @@ public:
                : Page (panel_size, border)
        {}
 
-       wxString GetName () const
+       wxString GetName () const override
        {
                return _("Defaults");
        }
 
 #ifdef DCPOMATIC_OSX
-       wxBitmap GetLargeIcon () const
+       wxBitmap GetLargeIcon () const override
        {
-               return wxBitmap(bitmap_path("defaults"), wxBITMAP_TYPE_PNG);
+               return wxBitmap(bitmap_path("defaults.png"), wxBITMAP_TYPE_PNG);
        }
 #endif
 
 private:
-       void setup ()
+       void setup () override
        {
                auto table = new wxFlexGridSizer (2, DCPOMATIC_SIZER_X_GAP, DCPOMATIC_SIZER_Y_GAP);
                table->AddGrowableCol (1, 1);
@@ -338,6 +343,14 @@ private:
                _kdm_type = new KDMChoice (_panel);
                table->Add (_kdm_type, 1, wxEXPAND);
 
+               add_label_to_sizer (table, _panel, _("Default KDM duration"), true, 0, wxLEFT | wxRIGHT | wxALIGN_CENTRE_VERTICAL);
+               _kdm_duration = new wxSpinCtrl (_panel);
+               _kdm_duration_unit = new wxChoice (_panel, wxID_ANY);
+               auto kdm_duration_sizer = new wxBoxSizer (wxHORIZONTAL);
+               kdm_duration_sizer->Add (_kdm_duration, 0, wxEXPAND | wxRIGHT, DCPOMATIC_SIZER_GAP);
+               kdm_duration_sizer->Add (_kdm_duration_unit, 0, wxEXPAND | wxRIGHT, DCPOMATIC_SIZER_GAP);
+               table->Add (kdm_duration_sizer, 1, wxEXPAND);
+
                table->Add (_use_isdcf_name_by_default = new CheckBox(_panel, _("Use ISDCF name by default")), 0, wxALIGN_CENTRE_VERTICAL);
 
                _still_length->SetRange (1, 3600);
@@ -346,6 +359,13 @@ private:
                _directory->Bind (wxEVT_DIRPICKER_CHANGED, boost::bind (&DefaultsPage::directory_changed, this));
                _kdm_directory->Bind (wxEVT_DIRPICKER_CHANGED, boost::bind (&DefaultsPage::kdm_directory_changed, this));
                _kdm_type->Bind (wxEVT_CHOICE, boost::bind(&DefaultsPage::kdm_type_changed, this));
+               _kdm_duration_unit->Append (_("days"));
+               _kdm_duration_unit->Append (_("weeks"));
+               _kdm_duration_unit->Append (_("months"));
+               _kdm_duration_unit->Append (_("years"));
+
+               _kdm_duration->Bind (wxEVT_SPINCTRL, boost::bind(&DefaultsPage::kdm_duration_changed, this));
+               _kdm_duration_unit->Bind (wxEVT_CHOICE, boost::bind(&DefaultsPage::kdm_duration_changed, this));
 
                _use_isdcf_name_by_default->Bind (wxEVT_CHECKBOX, boost::bind(&DefaultsPage::use_isdcf_name_by_default_changed, this));
 
@@ -383,7 +403,7 @@ private:
                }
        }
 
-       void config_changed ()
+       void config_changed () override
        {
                auto config = Config::instance ();
 
@@ -431,9 +451,51 @@ private:
                        }
                }
 
+               checked_set (_kdm_duration, config->default_kdm_duration().duration);
+               switch (config->default_kdm_duration().unit) {
+                       case RoughDuration::Unit::DAYS:
+                               _kdm_duration->SetRange(1, 365);
+                               checked_set (_kdm_duration_unit, 0);
+                               break;
+                       case RoughDuration::Unit::WEEKS:
+                               _kdm_duration->SetRange(1, 52);
+                               checked_set (_kdm_duration_unit, 1);
+                               break;
+                       case RoughDuration::Unit::MONTHS:
+                               _kdm_duration->SetRange(1, 12);
+                               checked_set (_kdm_duration_unit, 2);
+                               break;
+                       case RoughDuration::Unit::YEARS:
+                               _kdm_duration->SetRange(1, 40);
+                               checked_set (_kdm_duration_unit, 3);
+                               break;
+               }
+
                setup_sensitivity ();
        }
 
+       void kdm_duration_changed ()
+       {
+               auto config = Config::instance();
+               auto duration = _kdm_duration->GetValue();
+               RoughDuration::Unit unit = RoughDuration::Unit::DAYS;
+               switch (_kdm_duration_unit->GetSelection()) {
+               case 0:
+                       unit = RoughDuration::Unit::DAYS;
+                       break;
+               case 1:
+                       unit = RoughDuration::Unit::WEEKS;
+                       break;
+               case 2:
+                       unit = RoughDuration::Unit::MONTHS;
+                       break;
+               case 3:
+                       unit = RoughDuration::Unit::YEARS;
+                       break;
+               }
+               config->set_default_kdm_duration (RoughDuration(duration, unit));
+       }
+
        void j2k_bandwidth_changed ()
        {
                Config::instance()->set_default_j2k_bandwidth (_j2k_bandwidth->GetValue() * 1000000);
@@ -526,6 +588,8 @@ private:
        wxDirPickerCtrl* _kdm_directory;
 #endif
        KDMChoice* _kdm_type;
+       wxSpinCtrl* _kdm_duration;
+       wxChoice* _kdm_duration_unit;
        wxCheckBox* _use_isdcf_name_by_default;
        wxChoice* _container;
        wxChoice* _dcp_content_type;
@@ -543,20 +607,20 @@ public:
                : Page (panel_size, border)
        {}
 
-       wxString GetName () const
+       wxString GetName () const override
        {
                return _("Servers");
        }
 
 #ifdef DCPOMATIC_OSX
-       wxBitmap GetLargeIcon () const
+       wxBitmap GetLargeIcon () const override
        {
-               return wxBitmap(bitmap_path("servers"), wxBITMAP_TYPE_PNG);
+               return wxBitmap(bitmap_path("servers.png"), wxBITMAP_TYPE_PNG);
        }
 #endif
 
 private:
-       void setup ()
+       void setup () override
        {
                _use_any_servers = new CheckBox (_panel, _("Search network for servers"));
                _panel->GetSizer()->Add (_use_any_servers, 0, wxALL, _border);
@@ -568,7 +632,9 @@ private:
                        columns,
                        boost::bind (&Config::servers, Config::instance()),
                        boost::bind (&Config::set_servers, Config::instance(), _1),
-                       boost::bind (&EncodingServersPage::server_column, this, _1)
+                       boost::bind (&EncodingServersPage::server_column, this, _1),
+                       false,
+                       EditableListButton::NEW | EditableListButton::EDIT | EditableListButton::REMOVE
                        );
 
                _panel->GetSizer()->Add (_servers_list, 1, wxEXPAND | wxALL, _border);
@@ -576,7 +642,7 @@ private:
                _use_any_servers->Bind (wxEVT_CHECKBOX, boost::bind(&EncodingServersPage::use_any_servers_changed, this));
        }
 
-       void config_changed ()
+       void config_changed () override
        {
                checked_set (_use_any_servers, Config::instance()->use_any_servers ());
                _servers_list->refresh ();
@@ -604,20 +670,20 @@ public:
                : Page (panel_size, border)
        {}
 
-       wxString GetName () const
+       wxString GetName () const override
        {
                return _("TMS");
        }
 
 #ifdef DCPOMATIC_OSX
-       wxBitmap GetLargeIcon () const
+       wxBitmap GetLargeIcon () const override
        {
-               return wxBitmap(bitmap_path("tms"), wxBITMAP_TYPE_PNG);
+               return wxBitmap(bitmap_path("tms.png"), wxBITMAP_TYPE_PNG);
        }
 #endif
 
 private:
-       void setup ()
+       void setup () override
        {
                _upload = new CheckBox (_panel, _("Upload DCP to TMS after creation"));
                _panel->GetSizer()->Add (_upload, 0, wxALL | wxEXPAND, _border);
@@ -657,7 +723,7 @@ private:
                _tms_password->Changed.connect (boost::bind (&TMSPage::tms_password_changed, this));
        }
 
-       void config_changed ()
+       void config_changed () override
        {
                auto config = Config::instance ();
 
@@ -715,20 +781,20 @@ public:
                : Page (panel_size, border)
        {}
 
-       wxString GetName () const
+       wxString GetName () const override
        {
                return _("Email");
        }
 
 #ifdef DCPOMATIC_OSX
-       wxBitmap GetLargeIcon () const
+       wxBitmap GetLargeIcon () const override
        {
-               return wxBitmap(bitmap_path("email"), wxBITMAP_TYPE_PNG);
+               return wxBitmap(bitmap_path("email.png"), wxBITMAP_TYPE_PNG);
        }
 #endif
 
 private:
-       void setup ()
+       void setup () override
        {
                auto table = new wxFlexGridSizer (2, DCPOMATIC_SIZER_X_GAP, DCPOMATIC_SIZER_Y_GAP);
                table->AddGrowableCol (1, 1);
@@ -762,14 +828,19 @@ private:
                _password = new PasswordEntry (_panel);
                table->Add (_password->get_panel(), 1, wxEXPAND | wxALL);
 
+               table->AddSpacer (0);
+               _send_test_email = new Button (_panel, _("Send test email..."));
+               table->Add (_send_test_email);
+
                _server->Bind (wxEVT_TEXT, boost::bind(&EmailPage::server_changed, this));
                _port->Bind (wxEVT_SPINCTRL, boost::bind(&EmailPage::port_changed, this));
                _protocol->Bind (wxEVT_CHOICE, boost::bind(&EmailPage::protocol_changed, this));
                _user->Bind (wxEVT_TEXT, boost::bind(&EmailPage::user_changed, this));
                _password->Changed.connect (boost::bind(&EmailPage::password_changed, this));
+               _send_test_email->Bind (wxEVT_BUTTON, boost::bind(&EmailPage::send_test_email_clicked, this));
        }
 
-       void config_changed ()
+       void config_changed () override
        {
                auto config = Config::instance ();
 
@@ -831,11 +902,41 @@ private:
                Config::instance()->set_mail_password(_password->get());
        }
 
+       void send_test_email_clicked ()
+       {
+               auto dialog = new SendTestEmailDialog(_panel);
+               auto result = dialog->ShowModal();
+               dialog->Destroy();
+               if (result == wxID_OK) {
+                       Emailer emailer(
+                               wx_to_std(dialog->from()),
+                               { wx_to_std(dialog->to()) },
+                               wx_to_std(_("DCP-o-matic test email")),
+                               wx_to_std(_("This is a test email from DCP-o-matic."))
+                               );
+                       auto config = Config::instance();
+                       try {
+                               emailer.send (config->mail_server(), config->mail_port(), config->mail_protocol(), config->mail_user(), config->mail_password());
+                       } catch (NetworkError& e) {
+                               error_dialog (_panel, std_to_wx(e.summary()), std_to_wx(e.detail().get_value_or("")));
+                               return;
+                       } catch (std::exception& e) {
+                               error_dialog (_panel, _("Test email sending failed."), std_to_wx(e.what()));
+                               return;
+                       } catch (...) {
+                               error_dialog (_panel, _("Test email sending failed."));
+                               return;
+                       }
+                       message_dialog (_panel, _("Test email sent."));
+               }
+       }
+
        wxTextCtrl* _server;
        wxSpinCtrl* _port;
        wxChoice* _protocol;
        wxTextCtrl* _user;
        PasswordEntry* _password;
+       Button* _send_test_email;
 };
 
 
@@ -852,20 +953,20 @@ public:
 #endif
        {}
 
-       wxString GetName () const
+       wxString GetName () const override
        {
                return _("KDM Email");
        }
 
 #ifdef DCPOMATIC_OSX
-       wxBitmap GetLargeIcon () const
+       wxBitmap GetLargeIcon () const override
        {
-               return wxBitmap(bitmap_path("kdm_email"), wxBITMAP_TYPE_PNG);
+               return wxBitmap(bitmap_path("kdm_email.png"), wxBITMAP_TYPE_PNG);
        }
 #endif
 
 private:
-       void setup ()
+       void setup () override
        {
                auto table = new wxFlexGridSizer (2, DCPOMATIC_SIZER_X_GAP, DCPOMATIC_SIZER_Y_GAP);
                table->AddGrowableCol (1, 1);
@@ -889,7 +990,10 @@ private:
                        bind (&Config::set_kdm_cc, Config::instance(), _1),
                        [] (string s, int) {
                                return s;
-                       });
+                       },
+                       true,
+                       EditableListButton::NEW | EditableListButton::EDIT | EditableListButton::REMOVE
+                       );
                table->Add (_cc, 1, wxEXPAND | wxALL);
 
                add_label_to_sizer (table, _panel, _("BCC address"), true, 0, wxLEFT | wxRIGHT | wxALIGN_CENTRE_VERTICAL);
@@ -911,9 +1015,9 @@ private:
                _reset_email->Bind (wxEVT_BUTTON, boost::bind (&KDMEmailPage::reset_email, this));
        }
 
-       void config_changed ()
+       void config_changed () override
        {
-               Config* config = Config::instance ();
+               auto config = Config::instance ();
 
                checked_set (_subject, config->kdm_subject ());
                checked_set (_from, config->kdm_from ());
@@ -974,20 +1078,20 @@ public:
 #endif
        {}
 
-       wxString GetName () const
+       wxString GetName () const override
        {
                return _("Notifications");
        }
 
 #ifdef DCPOMATIC_OSX
-       wxBitmap GetLargeIcon () const
+       wxBitmap GetLargeIcon () const override
        {
-               return wxBitmap(bitmap_path("notifications"), wxBITMAP_TYPE_PNG);
+               return wxBitmap(bitmap_path("notifications.png"), wxBITMAP_TYPE_PNG);
        }
 #endif
 
 private:
-       void setup ()
+       void setup () override
        {
                auto table = new wxFlexGridSizer (2, DCPOMATIC_SIZER_X_GAP, DCPOMATIC_SIZER_Y_GAP);
                table->AddGrowableCol (1, 1);
@@ -1023,7 +1127,10 @@ private:
                        bind (&Config::set_notification_cc, Config::instance(), _1),
                        [] (string s, int) {
                                return s;
-                       });
+                       },
+                       true,
+                       EditableListButton::NEW | EditableListButton::EDIT | EditableListButton::REMOVE
+                       );
                table->Add (_cc, 1, wxEXPAND | wxALL);
 
                add_label_to_sizer (table, _panel, _("BCC address"), true, 0, wxLEFT | wxRIGHT | wxALIGN_CENTRE_VERTICAL);
@@ -1063,7 +1170,7 @@ private:
                _reset_email->Enable(s);
        }
 
-       void config_changed ()
+       void config_changed () override
        {
                auto config = Config::instance ();
 
@@ -1147,20 +1254,20 @@ public:
 #endif
        {}
 
-       wxString GetName () const
+       wxString GetName () const override
        {
                return _("Cover Sheet");
        }
 
 #ifdef DCPOMATIC_OSX
-       wxBitmap GetLargeIcon () const
+       wxBitmap GetLargeIcon () const override
        {
-               return wxBitmap(bitmap_path("cover_sheet"), wxBITMAP_TYPE_PNG);
+               return wxBitmap(bitmap_path("cover_sheet.png"), wxBITMAP_TYPE_PNG);
        }
 #endif
 
 private:
-       void setup ()
+       void setup () override
        {
                _cover_sheet = new wxTextCtrl (_panel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize (-1, 200), wxTE_MULTILINE);
                _panel->GetSizer()->Add (_cover_sheet, 0, wxEXPAND | wxALL, _border);
@@ -1172,7 +1279,7 @@ private:
                _reset_cover_sheet->Bind (wxEVT_BUTTON, boost::bind (&CoverSheetPage::reset_cover_sheet, this));
        }
 
-       void config_changed ()
+       void config_changed () override
        {
                checked_set (_cover_sheet, Config::instance()->cover_sheet());
        }
@@ -1206,20 +1313,20 @@ public:
                : Page (panel_size, border)
        {}
 
-       wxString GetName () const
+       wxString GetName () const override
        {
                return _("Identifiers");
        }
 
 #ifdef DCPOMATIC_OSX
-       wxBitmap GetLargeIcon () const
+       wxBitmap GetLargeIcon () const override
        {
-               return wxBitmap(bitmap_path("identifiers"), wxBITMAP_TYPE_PNG);
+               return wxBitmap(bitmap_path("identifiers.png"), wxBITMAP_TYPE_PNG);
        }
 #endif
 
 private:
-       void setup ()
+       void setup () override
        {
                auto table = new wxFlexGridSizer (2, DCPOMATIC_SIZER_X_GAP, DCPOMATIC_SIZER_Y_GAP);
                table->AddGrowableCol (1, 1);
@@ -1264,7 +1371,7 @@ private:
                _j2k_comment->Bind (wxEVT_TEXT, boost::bind(&IdentifiersPage::j2k_comment_changed, this));
        }
 
-       void config_changed ()
+       void config_changed () override
        {
                auto config = Config::instance ();
                checked_set (_issuer, config->dcp_issuer ());
@@ -1324,15 +1431,15 @@ public:
                : Page (panel_size, border)
        {}
 
-       wxString GetName () const
+       wxString GetName () const override
        {
                return _("Advanced");
        }
 
 #ifdef DCPOMATIC_OSX
-       wxBitmap GetLargeIcon () const
+       wxBitmap GetLargeIcon () const override
        {
-               return wxBitmap(bitmap_path("advanced"), wxBITMAP_TYPE_PNG);
+               return wxBitmap(bitmap_path("advanced.png"), wxBITMAP_TYPE_PNG);
        }
 #endif
 
@@ -1348,7 +1455,7 @@ private:
                table->Add (m, 0, flags, DCPOMATIC_SIZER_Y_GAP);
        }
 
-       void setup ()
+       void setup () override
        {
                auto table = new wxFlexGridSizer (2, DCPOMATIC_SIZER_X_GAP, DCPOMATIC_SIZER_Y_GAP);
                table->AddGrowableCol (1, 1);
@@ -1375,23 +1482,29 @@ private:
                table->AddSpacer (0);
 
                _allow_any_dcp_frame_rate = new CheckBox (_panel, _("Allow any DCP frame rate"));
-               table->Add (_allow_any_dcp_frame_rate, 1, wxEXPAND | wxALL);
+               table->Add (_allow_any_dcp_frame_rate, 1, wxEXPAND | wxLEFT, DCPOMATIC_SIZER_GAP);
                table->AddSpacer (0);
 
                _allow_any_container = new CheckBox (_panel, _("Allow full-frame and non-standard container ratios"));
-               table->Add (_allow_any_container, 1, wxEXPAND | wxALL);
-               table->AddSpacer (0);
-
-               restart = add_label_to_sizer (table, _panel, _("(restart DCP-o-matic to see all ratios)"), false);
+               table->Add (_allow_any_container, 1, wxEXPAND | wxLEFT, DCPOMATIC_SIZER_GAP);
+               restart = new StaticText (_panel, _("(restart DCP-o-matic to see all ratios)"));
+               table->Add (restart, 1, wxEXPAND | wxALL | wxALIGN_CENTRE_VERTICAL);
                restart->SetFont (font);
+
+               _allow_96khz_audio = new CheckBox (_panel, _("Allow creation of DCPs with 96kHz audio"));
+               table->Add (_allow_96khz_audio, 1, wxEXPAND | wxLEFT, DCPOMATIC_SIZER_GAP);
                table->AddSpacer (0);
 
+               _use_all_audio_channels = new CheckBox(_panel, _("Allow mapping to all audio channels"));
+               table->Add(_use_all_audio_channels, 1, wxEXPAND | wxLEFT, DCPOMATIC_SIZER_GAP);
+               table->AddSpacer(0);
+
                _show_experimental_audio_processors = new CheckBox (_panel, _("Show experimental audio processors"));
-               table->Add (_show_experimental_audio_processors, 1, wxEXPAND | wxALL);
+               table->Add (_show_experimental_audio_processors, 1, wxEXPAND | wxLEFT, DCPOMATIC_SIZER_GAP);
                table->AddSpacer (0);
 
                _only_servers_encode = new CheckBox (_panel, _("Only servers encode"));
-               table->Add (_only_servers_encode, 1, wxEXPAND | wxALL);
+               table->Add (_only_servers_encode, 1, wxEXPAND | wxLEFT, DCPOMATIC_SIZER_GAP);
                table->AddSpacer (0);
 
                {
@@ -1409,7 +1522,7 @@ private:
                        align->Add (format, 0, wxTOP, 2);
                        table->Add (align, 0, wxALIGN_RIGHT | wxRIGHT, DCPOMATIC_SIZER_GAP - 2);
 #else
-                       table->Add (format, 0, wxTOP | wxRIGHT | wxALIGN_TOP, DCPOMATIC_SIZER_GAP);
+                       table->Add (format, 0, wxTOP | wxLEFT | wxRIGHT | wxALIGN_TOP, DCPOMATIC_SIZER_GAP);
 #endif
                        dcp::NameFormat::Map titles;
                        titles['t'] = wx_to_std (_("type (cpl/pkl)"));
@@ -1428,7 +1541,7 @@ private:
                        align->Add (format, 0, wxTOP, 2);
                        table->Add (align, 0, wxALIGN_RIGHT | wxRIGHT, DCPOMATIC_SIZER_GAP - 2);
 #else
-                       table->Add (format, 0, wxTOP | wxRIGHT | wxALIGN_TOP, DCPOMATIC_SIZER_GAP);
+                       table->Add (format, 0, wxTOP | wxLEFT | wxRIGHT | wxALIGN_TOP, DCPOMATIC_SIZER_GAP);
 #endif
                        dcp::NameFormat::Map titles;
                        titles['t'] = wx_to_std (_("type (j2c/pcm/sub)"));
@@ -1488,6 +1601,8 @@ private:
                _video_display_mode->Bind (wxEVT_CHOICE, boost::bind(&AdvancedPage::video_display_mode_changed, this));
                _allow_any_dcp_frame_rate->Bind (wxEVT_CHECKBOX, boost::bind (&AdvancedPage::allow_any_dcp_frame_rate_changed, this));
                _allow_any_container->Bind (wxEVT_CHECKBOX, boost::bind (&AdvancedPage::allow_any_container_changed, this));
+               _allow_96khz_audio->Bind (wxEVT_CHECKBOX, boost::bind(&AdvancedPage::allow_96khz_audio_changed, this));
+               _use_all_audio_channels->Bind(wxEVT_CHECKBOX, boost::bind(&AdvancedPage::use_all_channels_changed, this));
                _show_experimental_audio_processors->Bind (wxEVT_CHECKBOX, boost::bind (&AdvancedPage::show_experimental_audio_processors_changed, this));
                _only_servers_encode->Bind (wxEVT_CHECKBOX, boost::bind (&AdvancedPage::only_servers_encode_changed, this));
                _frames_in_memory_multiplier->Bind (wxEVT_SPINCTRL, boost::bind(&AdvancedPage::frames_in_memory_multiplier_changed, this));
@@ -1508,7 +1623,7 @@ private:
 #endif
        }
 
-       void config_changed ()
+       void config_changed () override
        {
                auto config = Config::instance ();
 
@@ -1523,6 +1638,8 @@ private:
                }
                checked_set (_allow_any_dcp_frame_rate, config->allow_any_dcp_frame_rate ());
                checked_set (_allow_any_container, config->allow_any_container ());
+               checked_set (_allow_96khz_audio, config->allow_96khz_audio());
+               checked_set (_use_all_audio_channels, config->use_all_audio_channels());
                checked_set (_show_experimental_audio_processors, config->show_experimental_audio_processors ());
                checked_set (_only_servers_encode, config->only_servers_encode ());
                checked_set (_log_general, config->log_types() & LogEntry::TYPE_GENERAL);
@@ -1570,6 +1687,16 @@ private:
                Config::instance()->set_allow_any_container(_allow_any_container->GetValue());
        }
 
+       void allow_96khz_audio_changed ()
+       {
+               Config::instance()->set_allow_96hhz_audio(_allow_96khz_audio->GetValue());
+       }
+
+       void use_all_channels_changed ()
+       {
+               Config::instance()->set_use_all_audio_channels(_use_all_audio_channels->GetValue());
+       }
+
        void show_experimental_audio_processors_changed ()
        {
                Config::instance()->set_show_experimental_audio_processors(_show_experimental_audio_processors->GetValue());
@@ -1638,6 +1765,8 @@ private:
        wxSpinCtrl* _frames_in_memory_multiplier = nullptr;
        wxCheckBox* _allow_any_dcp_frame_rate = nullptr;
        wxCheckBox* _allow_any_container = nullptr;
+       wxCheckBox* _allow_96khz_audio = nullptr;
+       wxCheckBox* _use_all_audio_channels = nullptr;
        wxCheckBox* _show_experimental_audio_processors = nullptr;
        wxCheckBox* _only_servers_encode = nullptr;
        NameFormatEditor* _dcp_metadata_filename_format = nullptr;