summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2009-10-05 20:29:18 -0700
committerEric Laurent <elaurent@google.com>2009-10-06 18:59:35 -0700
commit62443f5f4517ba17d911975e695f1ab75bfdbf77 (patch)
tree449644bbac50efbe048b25eea7275b5ea74aab2e /include
parentc404ed2be5d29c8932a3d69b53fea4653c9b868b (diff)
downloadframeworks_base-62443f5f4517ba17d911975e695f1ab75bfdbf77.zip
frameworks_base-62443f5f4517ba17d911975e695f1ab75bfdbf77.tar.gz
frameworks_base-62443f5f4517ba17d911975e695f1ab75bfdbf77.tar.bz2
Fix issue 2139634: DTMF tones on Sholes popping, hissing (audio latency too high).
This change is a complement to the main fix in kernel driver for the same issue (partner change #1250). It removes clicks sometimes heard after the end of the tones while audio flinger is sending 0s to the audio output stream. The problem was that the sleep time between two writes was more than the duration of one audio output stream buffer which could cause some underrun. Also fixed a recent regression in ToneGenerator that made that the end of previous tone was repeated at the beginning of current one under certain timing circumstances when the maximum tone duration was specified.
Diffstat (limited to 'include')
-rw-r--r--include/media/ToneGenerator.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/media/ToneGenerator.h b/include/media/ToneGenerator.h
index e8df08e..c884c2c 100644
--- a/include/media/ToneGenerator.h
+++ b/include/media/ToneGenerator.h
@@ -248,6 +248,7 @@ private:
// only if tone duration is less than about 27 Hours(@44100Hz sampling rate). If this time is exceeded,
// no crash will occur but tone sequence will show a glitch.
unsigned int mMaxSmp; // Maximum number of audio samples played (maximun tone duration)
+ int mDurationMs; // Maximum tone duration in ms
unsigned short mCurSegment; // Current segment index in ToneDescriptor segments[]
unsigned short mCurCount; // Current sequence repeat count