Handle multiple audio streams in a single piece of content
[dcpomatic.git] / src / wx / content_properties_dialog.cc
index c212eb50a7665e4ed9d37ef16f4e02b9d067ea13..feb2c6a4631a7b2bac65f0b7a50bbd2e23257166 100644 (file)
@@ -53,19 +53,13 @@ ContentPropertiesDialog::ContentPropertiesDialog (wxWindow* parent, shared_ptr<C
                        );
        }
 
-       shared_ptr<AudioContent> audio = dynamic_pointer_cast<AudioContent> (content);
-       if (audio) {
-               add_property (
-                       _("Audio channels"),
-                       std_to_wx (raw_convert<string> (audio->audio_channels ()))
-                       );
-       }
-
+       /* XXX: this could be better wrt audio streams */
+       
        shared_ptr<SingleStreamAudioContent> single = dynamic_pointer_cast<SingleStreamAudioContent> (content);
        if (single) {
                add_property (
-                       _("Audio length"),
-                       std_to_wx (raw_convert<string> (single->audio_length())) + " " + _("audio frames")
+                       _("Audio channels"),
+                       std_to_wx (raw_convert<string> (single->audio_stream()->channels ()))
                        );
        }