From 904dfe04e4014c0a30c423cc052eb888bbaf3346 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Wed, 11 Sep 2024 00:26:15 +0200 Subject: Merge audio_time() into time(). --- src/wx/film_viewer.cc | 13 +++---------- src/wx/film_viewer.h | 1 - 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 -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 audio_time () const; int dropped () const; int errored () const; -- cgit v1.2.3