summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJames Dong <jdong@google.com>2010-08-27 18:09:37 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2010-08-27 18:09:37 -0700
commitc6ff7a91890305877410c5ddf853bd961a7d11cc (patch)
treebe43725eacd51e49f70556722d8dc0a11b619001 /include
parent8abd4256f3b94d5e44583a975603894c52dc039a (diff)
parent7d3ff3849c830f0136c692b6074f1ba5da288fe7 (diff)
downloadframeworks_base-c6ff7a91890305877410c5ddf853bd961a7d11cc.zip
frameworks_base-c6ff7a91890305877410c5ddf853bd961a7d11cc.tar.gz
frameworks_base-c6ff7a91890305877410c5ddf853bd961a7d11cc.tar.bz2
am 7d3ff384: am b86365ad: Merge "Suppress the video recording start signal - bug 2950297" into gingerbread
Merge commit '7d3ff3849c830f0136c692b6074f1ba5da288fe7' * commit '7d3ff3849c830f0136c692b6074f1ba5da288fe7': Suppress the video recording start signal
Diffstat (limited to 'include')
-rw-r--r--include/media/stagefright/AudioSource.h18
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 &);
};