diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-05-16 08:36:47 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-05-16 08:36:47 +0100 |
| commit | 21ce34c2cd04a2e7e133ff693b84c054182f4f91 (patch) | |
| tree | 5bda50a34b2fa7526dcd682578247f75a85d26b1 /src/lib/sndfile_content.cc | |
| parent | 0db016f90ae722fc8b72d465e21d9f153f72b340 (diff) | |
Compiles; strange hang on adding content to a film.
Diffstat (limited to 'src/lib/sndfile_content.cc')
| -rw-r--r-- | src/lib/sndfile_content.cc | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/lib/sndfile_content.cc b/src/lib/sndfile_content.cc index 539b0dfb5..210ca1577 100644 --- a/src/lib/sndfile_content.cc +++ b/src/lib/sndfile_content.cc @@ -68,7 +68,7 @@ SndfileContent::information () const s << String::compose ( _("%1 channels, %2kHz, %3 samples"), audio_channels(), - audio_frame_rate() / 1000.0, + content_audio_frame_rate() / 1000.0, audio_length() ); @@ -120,3 +120,15 @@ SndfileContent::as_xml (xmlpp::Node* node) const node->add_child("AudioFrameRate")->add_child_text (lexical_cast<string> (_audio_frame_rate)); } +int +SndfileContent::output_audio_frame_rate (shared_ptr<const Film>) const +{ + /* Resample to a DCI-approved sample rate */ + return dcp_audio_frame_rate (content_audio_frame_rate ()); +} + +Time +SndfileContent::length (shared_ptr<const Film> film) const +{ + return film->audio_frames_to_time (audio_length ()); +} |
