From fa4d2529d63bcfa7cf7c516b7227e20a1b6dec7e Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 21 May 2017 19:48:14 +0100 Subject: Do resampling in AudioDecoder rather than Player. This fixes the problem where the decoder's position would not take into account that all samples pushed into the resampler do not always immediately come out. This would result in Player thinking that there would be gaps when there are not. --- src/lib/audio_decoder.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/lib/audio_decoder.h') diff --git a/src/lib/audio_decoder.h b/src/lib/audio_decoder.h index c104d8201..fcbd8267b 100644 --- a/src/lib/audio_decoder.h +++ b/src/lib/audio_decoder.h @@ -36,6 +36,7 @@ class AudioBuffers; class AudioContent; class AudioDecoderStream; class Log; +class Resampler; /** @class AudioDecoder. * @brief Parent class for audio decoders. @@ -48,12 +49,15 @@ public: ContentTime position () const; void emit (AudioStreamPtr stream, boost::shared_ptr, ContentTime); void seek (); + void flush (); boost::signals2::signal Data; private: + boost::shared_ptr _content; /** Frame after the last one that was emitted from Data for each AudioStream */ std::map _positions; + std::map > _resamplers; }; #endif -- cgit v1.2.3