summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2024-09-11 00:26:15 +0200
committerCarl Hetherington <cth@carlh.net>2024-09-11 00:26:15 +0200
commit904dfe04e4014c0a30c423cc052eb888bbaf3346 (patch)
treeca29e52e1fa9efa5d3e5f1c04ddc6320040a5117
parent9e62be39253a1a8ac2da97b08bfaa2066ced2ed1 (diff)
Merge audio_time() into time().
-rw-r--r--src/wx/film_viewer.cc13
-rw-r--r--src/wx/film_viewer.h1
2 files changed, 3 insertions, 11 deletions
diff --git a/src/wx/film_viewer.cc b/src/wx/film_viewer.cc
index 7a3d58734..4b864d2a9 100644
--- a/src/wx/film_viewer.cc
+++ b/src/wx/film_viewer.cc
@@ -701,13 +701,13 @@ FilmViewer::uncorrected_time () const
}
-optional<DCPTime>
-FilmViewer::audio_time () const
+DCPTime
+FilmViewer::time () const
{
auto& audio = AudioBackend::instance()->rtaudio();
if (!audio.isStreamRunning()) {
- return {};
+ return _video_view->position();
}
return DCPTime::from_seconds(audio.getStreamTime()) -
@@ -715,13 +715,6 @@ FilmViewer::audio_time () const
}
-DCPTime
-FilmViewer::time () const
-{
- return audio_time().get_value_or(_video_view->position());
-}
-
-
int
FilmViewer::audio_callback (void* out_p, unsigned int frames)
{
diff --git a/src/wx/film_viewer.h b/src/wx/film_viewer.h
index ab5091ad0..3918bb6c1 100644
--- a/src/wx/film_viewer.h
+++ b/src/wx/film_viewer.h
@@ -109,7 +109,6 @@ public:
* and video that should be coming out of the video output.
*/
dcpomatic::DCPTime time () const;
- boost::optional<dcpomatic::DCPTime> audio_time () const;
int dropped () const;
int errored () const;