/*
- Copyright (C) 2013-2016 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2013-2018 Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
wxBoxSizer* left = new wxBoxSizer (wxVERTICAL);
+ _cursor = new wxStaticText (this, wxID_ANY, wxT("Cursor: none"));
+ left->Add (_cursor, 0, wxTOP, DCPOMATIC_SIZER_Y_GAP);
_plot = new AudioPlot (this);
left->Add (_plot, 1, wxTOP | wxEXPAND, 12);
_sample_peak = new wxStaticText (this, wxID_ANY, wxT (""));
overall_sizer->SetSizeHints (this);
_film_connection = film->ContentChanged.connect (boost::bind (&AudioDialog::content_changed, this, _2));
- SetTitle (_("DCP-o-matic audio"));
+ DCPOMATIC_ASSERT (film->directory());
+ SetTitle(wxString::Format(_("DCP-o-matic audio - %s"), std_to_wx(film->directory().get().string())));
if (content) {
_playlist.reset (new Playlist ());
} else {
_playlist = film->playlist ();
}
+
+ _plot->Cursor.connect (bind (&AudioDialog::set_cursor, this, _1, _2));
}
void
try_to_load_analysis ();
return r;
}
+
+void
+AudioDialog::set_cursor (optional<DCPTime> time, optional<float> db)
+{
+ if (!time || !db) {
+ _cursor->SetLabel (_("Cursor: none"));
+ return;
+ }
+
+ shared_ptr<Film> film = _film.lock();
+ DCPOMATIC_ASSERT (film);
+ _cursor->SetLabel (wxString::Format (_("Cursor: %.1fdB at %s"), *db, time->timecode(film->video_frame_rate())));
+}