- _set_language->Bind (wxEVT_COMMAND_CHECKBOX_CLICKED, boost::bind (&GeneralPage::set_language_changed, this));
- _language->Bind (wxEVT_COMMAND_CHOICE_SELECTED, boost::bind (&GeneralPage::language_changed, this));
- _cinemas_file->Bind (wxEVT_COMMAND_FILEPICKER_CHANGED, boost::bind (&GeneralPage::cinemas_file_changed, this));
-
- _num_local_encoding_threads->SetRange (1, 128);
- _num_local_encoding_threads->Bind (wxEVT_COMMAND_SPINCTRL_UPDATED, boost::bind (&GeneralPage::num_local_encoding_threads_changed, this));
+ RtAudio audio (DCPOMATIC_RTAUDIO_API);
+ for (unsigned int i = 0; i < audio.getDeviceCount(); ++i) {
+ RtAudio::DeviceInfo dev = audio.getDeviceInfo (i);
+ if (dev.probed && dev.outputChannels > 0) {
+ _preview_sound_output->Append (std_to_wx (dev.name));
+ }
+ }
+
+ _set_language->Bind (wxEVT_CHECKBOX, boost::bind (&GeneralPage::set_language_changed, this));
+ _language->Bind (wxEVT_CHOICE, boost::bind (&GeneralPage::language_changed, this));
+ _cinemas_file->Bind (wxEVT_FILEPICKER_CHANGED, boost::bind (&GeneralPage::cinemas_file_changed, this));
+ _preview_sound->Bind (wxEVT_CHECKBOX, boost::bind (&GeneralPage::preview_sound_changed, this));
+ _preview_sound_output->Bind (wxEVT_CHOICE, boost::bind (&GeneralPage::preview_sound_output_changed, this));
+
+ _master_encoding_threads->SetRange (1, 128);
+ _master_encoding_threads->Bind (wxEVT_SPINCTRL, boost::bind (&GeneralPage::master_encoding_threads_changed, this));
+ _server_encoding_threads->SetRange (1, 128);
+ _server_encoding_threads->Bind (wxEVT_SPINCTRL, boost::bind (&GeneralPage::server_encoding_threads_changed, this));