From 4ff14bae91075eb274eb1c2975982358946e7e63 Mon Sep 17 00:00:00 2001 From: John Grossman Date: Wed, 8 Feb 2012 16:37:41 -0800 Subject: Upintegrate Audio Flinger changes from ICS_AAH Bring in changes to audio flinger made to support timed audio tracks and HW master volume control. Change-Id: Ide52d48809bdbed13acf35fd59b24637e35064ae Signed-off-by: John Grossman --- services/audioflinger/AudioResampler.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'services/audioflinger/AudioResampler.h') diff --git a/services/audioflinger/AudioResampler.h b/services/audioflinger/AudioResampler.h index c23016e..9deb796 100644 --- a/services/audioflinger/AudioResampler.h +++ b/services/audioflinger/AudioResampler.h @@ -49,6 +49,10 @@ public: virtual void init() = 0; virtual void setSampleRate(int32_t inSampleRate); virtual void setVolume(int16_t left, int16_t right); + virtual void setLocalTimeFreq(uint64_t freq); + + // set the PTS of the next buffer output by the resampler + virtual void setPTS(int64_t pts); virtual void resample(int32_t* out, size_t outFrameCount, AudioBufferProvider* provider) = 0; @@ -72,6 +76,8 @@ protected: AudioResampler(const AudioResampler&); AudioResampler& operator=(const AudioResampler&); + int64_t calculateOutputPTS(int outputFrameIndex); + const int32_t mBitDepth; const int32_t mChannelCount; const int32_t mSampleRate; @@ -85,6 +91,8 @@ protected: size_t mInputIndex; int32_t mPhaseIncrement; uint32_t mPhaseFraction; + uint64_t mLocalTimeFreq; + int64_t mPTS; }; // ---------------------------------------------------------------------------- -- cgit v1.1