summaryrefslogtreecommitdiffstats
path: root/include/media/ToneGenerator.h
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
commite33e00e931d1381d402484aa5cde67e540e3c82c (patch)
tree406a97eb4bfe9bfb0d472cd4b7758d4518f8daee /include/media/ToneGenerator.h
parent5bffa09d4483ac31de42077d05d24ba26fab928d (diff)
downloadframeworks_av-e33e00e931d1381d402484aa5cde67e540e3c82c.zip
frameworks_av-e33e00e931d1381d402484aa5cde67e540e3c82c.tar.gz
frameworks_av-e33e00e931d1381d402484aa5cde67e540e3c82c.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/media/ToneGenerator.h')
-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