summaryrefslogtreecommitdiffstats
path: root/services/audioflinger/AudioResampler.h
diff options
context:
space:
mode:
authorJohn Grossman <johngro@google.com>2012-02-08 16:37:41 -0800
committerJohn Grossman <johngro@google.com>2012-02-16 13:45:11 -0800
commit4ff14bae91075eb274eb1c2975982358946e7e63 (patch)
treee9e54fddb9832d30b69c2a11c9ed2884397f2f95 /services/audioflinger/AudioResampler.h
parent951bd8d1ad9581a414e171ad8605a9515d0ad667 (diff)
downloadframeworks_av-4ff14bae91075eb274eb1c2975982358946e7e63.zip
frameworks_av-4ff14bae91075eb274eb1c2975982358946e7e63.tar.gz
frameworks_av-4ff14bae91075eb274eb1c2975982358946e7e63.tar.bz2
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 <johngro@google.com>
Diffstat (limited to 'services/audioflinger/AudioResampler.h')
-rw-r--r--services/audioflinger/AudioResampler.h8
1 files changed, 8 insertions, 0 deletions
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;
};
// ----------------------------------------------------------------------------