X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fsndfile_content.cc;h=0eb7efb2f92bd5d96181c9cdf352e7f585cd9760;hb=661de111c0dbc968ecb004eca5b26f8400b136f1;hp=1a17976657c42759a10566aaec00559de94e1ba9;hpb=2d24bc7aaed800415bce4fffe06f261d5e9e464a;p=dcpomatic.git diff --git a/src/lib/sndfile_content.cc b/src/lib/sndfile_content.cc index 1a1797665..0eb7efb2f 100644 --- a/src/lib/sndfile_content.cc +++ b/src/lib/sndfile_content.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2013-2014 Carl Hetherington + Copyright (C) 2013-2015 Carl Hetherington This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -18,7 +18,6 @@ */ #include -#include #include "sndfile_content.h" #include "sndfile_decoder.h" #include "film.h" @@ -32,7 +31,6 @@ using std::string; using std::cout; using boost::shared_ptr; -using dcp::raw_convert; SndfileContent::SndfileContent (shared_ptr f, boost::filesystem::path p) : Content (f, p) @@ -72,25 +70,6 @@ SndfileContent::technical_summary () const + " - sndfile"; } -string -SndfileContent::information () const -{ - if (_audio_frame_rate == 0) { - return ""; - } - - SafeStringStream s; - - s << String::compose ( - _("%1 channels, %2kHz, %3 samples"), - audio_channels(), - audio_frame_rate() / 1000.0, - audio_length().frames (audio_frame_rate ()) - ); - - return s.str (); -} - bool SndfileContent::valid_file (boost::filesystem::path f) { @@ -113,7 +92,8 @@ DCPTime SndfileContent::full_length () const { shared_ptr film = _film.lock (); - assert (film); - return DCPTime (audio_length(), film->active_frame_rate_change (position ())); + DCPOMATIC_ASSERT (film); + FrameRateChange const frc = film->active_frame_rate_change (position ()); + return DCPTime::from_frames (audio_length() / frc.speed_up, audio_frame_rate ()); }