diff options
| author | Carl Hetherington <cth@carlh.net> | 2017-09-03 22:41:40 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2017-09-03 22:41:40 +0100 |
| commit | 4b2cf0764a4091b9466f90e6dbbeb029e04bc2be (patch) | |
| tree | df2833faa1f301b0a8a05a08d68dd922cac51d51 /src/lib/audio_decoder.cc | |
| parent | 257f36fea6aed378c3060c1789294b68b317a456 (diff) | |
Restore correct setup of fast resampler when the player is set to fast.
Diffstat (limited to 'src/lib/audio_decoder.cc')
| -rw-r--r-- | src/lib/audio_decoder.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/audio_decoder.cc b/src/lib/audio_decoder.cc index 16a03a8e9..5df4047db 100644 --- a/src/lib/audio_decoder.cc +++ b/src/lib/audio_decoder.cc @@ -37,9 +37,10 @@ using std::pair; using boost::shared_ptr; using boost::optional; -AudioDecoder::AudioDecoder (Decoder* parent, shared_ptr<const AudioContent> content, shared_ptr<Log> log) +AudioDecoder::AudioDecoder (Decoder* parent, shared_ptr<const AudioContent> content, shared_ptr<Log> log, bool fast) : DecoderPart (parent, log) , _content (content) + , _fast (fast) { /* Set up _positions so that we have one for each stream */ BOOST_FOREACH (AudioStreamPtr i, content->streams ()) { @@ -82,6 +83,9 @@ AudioDecoder::emit (AudioStreamPtr stream, shared_ptr<const AudioBuffers> data, ); resampler.reset (new Resampler (stream->frame_rate(), _content->resampled_frame_rate(), stream->channels())); + if (_fast) { + resampler->set_fast (); + } _resamplers[stream] = resampler; } } |
