diff options
| author | Carl Hetherington <cth@carlh.net> | 2018-07-04 23:42:21 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2018-07-04 23:42:21 +0100 |
| commit | a44d87088c380e2e282b1df65d6bd55795091c72 (patch) | |
| tree | eb7d736602a3b97da7581818953957ad8fdbc377 /src/wx/timeline_audio_content_view.cc | |
| parent | c15424c691168f2071bc54dadb9e265a58d334d1 (diff) | |
Label audio content with mapping (part of #1279).
Diffstat (limited to 'src/wx/timeline_audio_content_view.cc')
| -rw-r--r-- | src/wx/timeline_audio_content_view.cc | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/src/wx/timeline_audio_content_view.cc b/src/wx/timeline_audio_content_view.cc index e8d5265f7..fe098c48b 100644 --- a/src/wx/timeline_audio_content_view.cc +++ b/src/wx/timeline_audio_content_view.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2013-2015 Carl Hetherington <cth@carlh.net> + Copyright (C) 2013-2018 Carl Hetherington <cth@carlh.net> This file is part of DCP-o-matic. @@ -19,8 +19,13 @@ */ #include "timeline_audio_content_view.h" +#include "wx_util.h" +#include "lib/audio_content.h" +#include "lib/util.h" +using std::list; using boost::shared_ptr; +using boost::dynamic_pointer_cast; /** @class TimelineAudioContentView * @brief Timeline view for AudioContent. @@ -43,3 +48,20 @@ TimelineAudioContentView::foreground_colour () const { return wxColour (0, 0, 0, 255); } + +wxString +TimelineAudioContentView::label () const +{ + wxString s = TimelineContentView::label (); + shared_ptr<AudioContent> ac = content()->audio; + DCPOMATIC_ASSERT (ac); + list<int> mapped = ac->mapping().mapped_output_channels(); + if (!mapped.empty ()) { + s += " → "; + BOOST_FOREACH (int i, mapped) { + s += std_to_wx(short_audio_channel_name(i)) + ", "; + } + s = s.Left(s.Length() - 2); + } + return s; +} |
