From ee2c523ad1a9e7a975996956cd17168e8ad9e423 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 14 Apr 2016 02:25:22 +0100 Subject: Clean up; merge two methods. --- src/lib/sndfile_content.cc | 11 +++-------- src/lib/sndfile_content.h | 2 -- 2 files changed, 3 insertions(+), 10 deletions(-) (limited to 'src/lib') diff --git a/src/lib/sndfile_content.cc b/src/lib/sndfile_content.cc index ed7e67c3c..a51a7be1d 100644 --- a/src/lib/sndfile_content.cc +++ b/src/lib/sndfile_content.cc @@ -96,21 +96,16 @@ SndfileContent::examine (shared_ptr job) { job->set_progress_unknown (); Content::examine (job); - shared_ptr dec (new SndfileExaminer (shared_from_this ())); - take_from_audio_examiner (dec); -} + shared_ptr ex (new SndfileExaminer (shared_from_this ())); -void -SndfileContent::take_from_audio_examiner (shared_ptr examiner) -{ { boost::mutex::scoped_lock lm (_mutex); - AudioStreamPtr as (new AudioStream (examiner->audio_frame_rate(), examiner->audio_channels ())); + AudioStreamPtr as (new AudioStream (ex->audio_frame_rate(), ex->audio_channels ())); audio->set_stream (as); AudioMapping m = as->mapping (); film()->make_audio_mapping_default (m); as->set_mapping (m); - _audio_length = examiner->audio_length (); + _audio_length = ex->audio_length (); } signal_changed (AudioContentProperty::STREAMS); diff --git a/src/lib/sndfile_content.h b/src/lib/sndfile_content.h index dfd36971d..73d02edec 100644 --- a/src/lib/sndfile_content.h +++ b/src/lib/sndfile_content.h @@ -42,8 +42,6 @@ public: std::string information () const; void as_xml (xmlpp::Node *) const; - void take_from_audio_examiner (boost::shared_ptr); - static bool valid_file (boost::filesystem::path); private: -- cgit v1.2.3