summaryrefslogtreecommitdiff
path: root/src/wx/wx_util.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2015-05-10 00:15:44 +0100
committerCarl Hetherington <cth@carlh.net>2015-05-10 00:15:44 +0100
commitfc96a4b3d6985f28db6bc0e9418e98cc5bec87e3 (patch)
treee6866c8006ccf4fb400bfb8e8481a4f1142fb2e3 /src/wx/wx_util.cc
parent55002ca15ba288002aeedf3867fb9d07b7b653f0 (diff)
7fd73c0cf1f723896826c77fec3720c5c404d4e8 from master; tidy audio analysis dialogue and add overall peak.
Diffstat (limited to 'src/wx/wx_util.cc')
-rw-r--r--src/wx/wx_util.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/wx/wx_util.cc b/src/wx/wx_util.cc
index e9c07c91f..9c13cfbcb 100644
--- a/src/wx/wx_util.cc
+++ b/src/wx/wx_util.cc
@@ -330,3 +330,17 @@ context_translation (wxString s)
return t;
}
+
+wxString
+time_to_timecode (DCPTime t, float fps)
+{
+ double w = t.seconds ();
+ int const h = (w / 3600);
+ w -= h * 3600;
+ int const m = (w / 60);
+ w -= m * 60;
+ int const s = floor (w);
+ w -= s;
+ int const f = rint (w * fps);
+ return wxString::Format (wxT("%02d:%02d:%02d.%02d"), h, m, s, f);
+}