- shared_ptr<AudioContent> ac = dynamic_pointer_cast<AudioContent> (c);
- shared_ptr<FFmpegContent> fc = dynamic_pointer_cast<FFmpegContent> (c);
-
- if (_audio_dialog && _editor->selected_audio_content()) {
- _audio_dialog->set_content (_editor->selected_audio_content ());
- }
-
- if (property == AudioContentProperty::AUDIO_GAIN) {
- checked_set (_gain, ac ? ac->audio_gain() : 0);
- } else if (property == AudioContentProperty::AUDIO_DELAY) {
- checked_set (_delay, ac ? ac->audio_delay() : 0);
- } else if (property == AudioContentProperty::AUDIO_MAPPING) {
- _mapping->set (ac ? ac->audio_mapping () : AudioMapping ());
- _sizer->Layout ();
- } else if (property == FFmpegContentProperty::AUDIO_STREAM) {
- setup_stream_description ();
- } else if (property == FFmpegContentProperty::AUDIO_STREAMS) {
- _stream->Clear ();
- if (fc) {
- vector<shared_ptr<FFmpegAudioStream> > a = fc->audio_streams ();
- for (vector<shared_ptr<FFmpegAudioStream> >::iterator i = a.begin(); i != a.end(); ++i) {
- _stream->Append (std_to_wx ((*i)->name), new wxStringClientData (std_to_wx (lexical_cast<string> ((*i)->id))));
- }
-
- if (fc->audio_stream()) {
- checked_set (_stream, lexical_cast<string> (fc->audio_stream()->id));
- setup_stream_description ();
- }
+ if (property == AudioContentProperty::AUDIO_STREAMS) {
+ AudioContentList ac = _parent->selected_audio ();
+ if (ac.size() == 1) {
+ _mapping->set (ac.front()->audio_mapping());
+ _mapping->set_input_channels (ac.front()->audio_channel_names ());
+ } else {
+ _mapping->set (AudioMapping ());