diff options
| author | James Dong <jdong@google.com> | 2010-08-26 16:28:17 -0700 |
|---|---|---|
| committer | James Dong <jdong@google.com> | 2010-08-26 16:56:49 -0700 |
| commit | d7f1c3d69274fef8772a663ce1c792fd0466fcc5 (patch) | |
| tree | 0e6ea38c4933894e5058b0cbe05514a3b389f44c /include | |
| parent | a90b7f0125389b9e1040d2be82aad4ef74ea6071 (diff) | |
| download | frameworks_base-d7f1c3d69274fef8772a663ce1c792fd0466fcc5.zip frameworks_base-d7f1c3d69274fef8772a663ce1c792fd0466fcc5.tar.gz frameworks_base-d7f1c3d69274fef8772a663ce1c792fd0466fcc5.tar.bz2 | |
Suppress the video recording start signal
- bug 2950297
Change-Id: I0044d07178691feb904cf81e87c1b6d4b714dc1a
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 &); }; |
