summaryrefslogtreecommitdiff
path: root/src/lib/player.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2015-06-02 15:12:00 +0100
committerCarl Hetherington <cth@carlh.net>2015-06-02 15:12:00 +0100
commitc157cd97740a2ba55d3e87bd9844429cc7d49ce7 (patch)
treea27db11e3df078ef35b980ffe26f54152657932e /src/lib/player.cc
parent0a93237cb5e4642d3b698ff9b7d0cfae5401478c (diff)
Apply single-processor branch manually; processor is now in Film, not AudioContent.
Diffstat (limited to 'src/lib/player.cc')
-rw-r--r--src/lib/player.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/lib/player.cc b/src/lib/player.cc
index b81eb4d80..1a55a8472 100644
--- a/src/lib/player.cc
+++ b/src/lib/player.cc
@@ -45,6 +45,7 @@
#include "dcp_decoder.h"
#include "dcp_subtitle_content.h"
#include "dcp_subtitle_decoder.h"
+#include "audio_processor.h"
#include <boost/foreach.hpp>
#include <stdint.h>
#include <algorithm>
@@ -77,6 +78,8 @@ Player::Player (shared_ptr<const Film> f, shared_ptr<const Playlist> p)
_playlist_content_changed_connection = _playlist->ContentChanged.connect (bind (&Player::content_changed, this, _1, _2, _3));
_film_changed_connection = _film->Changed.connect (bind (&Player::film_changed, this, _1));
set_video_container_size (_film->frame_size ());
+
+ film_changed (Film::AUDIO_PROCESSOR);
}
void
@@ -247,6 +250,10 @@ Player::film_changed (Film::Property p)
if (p == Film::CONTAINER || p == Film::VIDEO_FRAME_RATE) {
Changed (false);
+ } else if (p == Film::AUDIO_PROCESSOR) {
+ if (_film->audio_processor ()) {
+ _audio_processor = _film->audio_processor()->clone (_film->audio_frame_rate ());
+ }
}
}
@@ -460,6 +467,10 @@ Player::get_audio (DCPTime time, DCPTime length, bool accurate)
}
}
}
+
+ if (_audio_processor) {
+ dcp_mapped = _audio_processor->run (dcp_mapped);
+ }
all.audio = dcp_mapped;