diff options
author | James Dong <jdong@google.com> | 2010-08-27 13:47:06 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2010-08-27 13:47:06 -0700 |
commit | 352c4683820c31eaad63e52a47d0d442bfe2c193 (patch) | |
tree | 4df9fbef2930ff8990a10cb47b45b29155cb0532 /include | |
parent | f8860bf3592debe89916aa49b7994a7deeee0df1 (diff) | |
parent | f1ae1963f5028a670573b50a9c1cfb504fc426b4 (diff) | |
download | frameworks_av-352c4683820c31eaad63e52a47d0d442bfe2c193.zip frameworks_av-352c4683820c31eaad63e52a47d0d442bfe2c193.tar.gz frameworks_av-352c4683820c31eaad63e52a47d0d442bfe2c193.tar.bz2 |
Merge "Suppress the video recording start signal - bug 2950297" into gingerbread
Diffstat (limited to 'include')
-rw-r--r-- | include/media/stagefright/AudioSource.h | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/include/media/stagefright/AudioSource.h b/include/media/stagefright/AudioSource.h index 2597e9e..1af4254 100644 --- a/include/media/stagefright/AudioSource.h +++ b/include/media/stagefright/AudioSource.h @@ -49,7 +49,17 @@ protected: virtual ~AudioSource(); private: - enum { kMaxBufferSize = 2048 }; + enum { + kMaxBufferSize = 2048, + + // After the initial mute, we raise the volume linearly + // over kAutoRampDurationUs. + kAutoRampDurationUs = 300000, + + // This is the initial mute duration to suppress + // the video recording signal tone + kAutoRampStartUs = 700000, + }; AudioRecord *mRecord; status_t mInitCheck; @@ -67,6 +77,12 @@ private: void trackMaxAmplitude(int16_t *data, int nSamples); + // This is used to raise the volume from mute to the + // actual level linearly. + void rampVolume( + int32_t startFrame, int32_t rampDurationFrames, + uint8_t *data, size_t bytes); + AudioSource(const AudioSource &); AudioSource &operator=(const AudioSource &); }; |