+ if (_audio_dialog && sel.size() == 1) {
+ _audio_dialog->set_content (sel.front ());
+ }
+
+ _gain->set_content (sel);
+ _delay->set_content (sel);
+
+ _gain_calculate_button->Enable (sel.size() == 1);
+ _show->Enable (sel.size() == 1);
+ _stream->Enable (sel.size() == 1);
+ _processor->Enable (!sel.empty());
+ _mapping->Enable (sel.size() == 1);
+
+ setup_processors ();
+
+ film_content_changed (AudioContentProperty::AUDIO_MAPPING);
+ film_content_changed (AudioContentProperty::AUDIO_PROCESSOR);
+ film_content_changed (AudioContentProperty::AUDIO_FRAME_RATE);
+ film_content_changed (FFmpegContentProperty::AUDIO_STREAM);
+ film_content_changed (FFmpegContentProperty::AUDIO_STREAMS);
+}
+
+void
+AudioPanel::setup_processors ()
+{
+ AudioContentList sel = _parent->selected_audio ();
+
+ _processor->Clear ();
+ list<AudioProcessor const *> ap = AudioProcessor::all ();
+ _processor->Append (_("None"), new wxStringClientData (N_("none")));
+ for (list<AudioProcessor const *>::const_iterator i = ap.begin(); i != ap.end(); ++i) {
+
+ AudioContentList::const_iterator j = sel.begin();
+ while (j != sel.end() && (*i)->in_channels().includes ((*j)->audio_channels ())) {
+ ++j;
+ }
+
+ if (j == sel.end ()) {
+ _processor->Append (std_to_wx ((*i)->name ()), new wxStringClientData (std_to_wx ((*i)->id ())));
+ }
+ }