summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2016-04-14 02:25:22 +0100
committerCarl Hetherington <cth@carlh.net>2016-05-18 11:50:29 +0100
commitee2c523ad1a9e7a975996956cd17168e8ad9e423 (patch)
treef5572a1b228dcd815928e92e9fabb2b70fbfe863 /src/lib
parentc423bc90054e13eea2fc16bae9b6d30afdd361be (diff)
Clean up; merge two methods.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/sndfile_content.cc11
-rw-r--r--src/lib/sndfile_content.h2
2 files changed, 3 insertions, 10 deletions
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)
{
job->set_progress_unknown ();
Content::examine (job);
- shared_ptr<AudioExaminer> dec (new SndfileExaminer (shared_from_this ()));
- take_from_audio_examiner (dec);
-}
+ shared_ptr<AudioExaminer> ex (new SndfileExaminer (shared_from_this ()));
-void
-SndfileContent::take_from_audio_examiner (shared_ptr<AudioExaminer> 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<AudioExaminer>);
-
static bool valid_file (boost::filesystem::path);
private: