summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorDavid Krause <david.krause@motorola.com>2009-06-17 15:46:13 -0500
committerWink Saville <wink@google.com>2009-06-23 12:32:12 -0700
commitb6d90ca1292ffab015d5068f9e184b1dc84b7233 (patch)
tree4713ca5d25092a8c630af7af79598ee5bb335208 /media
parentb0ae27f4e10a9e5fe56b9ca549718051fe342bba (diff)
downloadframeworks_base-b6d90ca1292ffab015d5068f9e184b1dc84b7233.zip
frameworks_base-b6d90ca1292ffab015d5068f9e184b1dc84b7233.tar.gz
frameworks_base-b6d90ca1292ffab015d5068f9e184b1dc84b7233.tar.bz2
Fill in CDMA gaps and clean up ToneGenerator code
Diffstat (limited to 'media')
-rw-r--r--media/java/android/media/ToneGenerator.java633
-rw-r--r--media/libmedia/ToneGenerator.cpp816
2 files changed, 1146 insertions, 303 deletions
diff --git a/media/java/android/media/ToneGenerator.java b/media/java/android/media/ToneGenerator.java
index 54ca6c4..e5ee9a3 100644
--- a/media/java/android/media/ToneGenerator.java
+++ b/media/java/android/media/ToneGenerator.java
@@ -50,12 +50,12 @@ public class ToneGenerator
*
* @see #ToneGenerator(int, int)
*/
- public static final int TONE_DTMF_2 = 2;
- /**
- * DTMF tone for key 3: 1477Hz, 697Hz, continuous
- *
- * @see #ToneGenerator(int, int)
- */
+ public static final int TONE_DTMF_2 = 2;
+ /**
+ * DTMF tone for key 3: 1477Hz, 697Hz, continuous
+ *
+ * @see #ToneGenerator(int, int)
+ */
public static final int TONE_DTMF_3 = 3;
/**
* DTMF tone for key 4: 1209Hz, 770Hz, continuous
@@ -254,242 +254,474 @@ public class ToneGenerator
* @see #ToneGenerator(int, int)
*/
public static final int TONE_SUP_PIP = 33;
-
-
/**
- * CDMA SPECIFIC TONES START
+ * CDMA Dial tone : 425Hz continuous
+ *
+ * @see #ToneGenerator(int, int)
*/
-
- /** TODO(Moto): Change "Proprietary" below with an appropriate specification reference */
-
+ public static final int TONE_CDMA_DIAL_TONE_LITE = 34;
/**
- * Proprietary tone, general double beep: twice 400Hz+1200Hz, 35ms ON, 200ms OFF, 35ms ON
+ * CDMA USA Ringback: 440Hz+480Hz 2s ON, 4000 OFF ...
*
* @see #ToneGenerator(int, int)
+ */
+ public static final int TONE_CDMA_NETWORK_USA_RINGBACK = 35;
+ /**
+ * CDMA Intercept tone: 440Hz 250ms ON, 620Hz 250ms ON ...
*
- * @hide
+ * @see #ToneGenerator(int, int)
*/
- public static final int TONE_CDMA_DIAL_TONE_LITE = 34;
-
- /**
- * Proprietary tone, general double beep: twice 400Hz+1200Hz, 35ms ON, 200ms OFF, 35ms ON
+ public static final int TONE_CDMA_INTERCEPT = 36;
+ /**
+ * CDMA Abbr Intercept tone: 440Hz 250ms ON, 620Hz 250ms ON
*
* @see #ToneGenerator(int, int)
+ */
+ public static final int TONE_CDMA_ABBR_INTERCEPT = 37;
+ /**
+ * CDMA Reorder tone: 480Hz+620Hz 250ms ON, 250ms OFF...
*
- * @hide
+ * @see #ToneGenerator(int, int)
*/
- public static final int TONE_CDMA_NETWORK_USA_RINGBACK = 35;
-
+ public static final int TONE_CDMA_REORDER = 38;
/**
- * Proprietary tone, general double beep: twice 400Hz+1200Hz, 35ms ON, 200ms OFF, 35ms ON
*
+ * CDMA Abbr Reorder tone: 480Hz+620Hz 250ms ON, 250ms OFF repeated for 8 times
* @see #ToneGenerator(int, int)
+ */
+ public static final int TONE_CDMA_ABBR_REORDER = 39;
+ /**
+ * CDMA Network Busy tone: 480Hz+620Hz 500ms ON, 500ms OFF continuous
*
- * @hide
+ * @see #ToneGenerator(int, int)
*/
- public static final int TONE_CDMA_REORDER = 36;
-
- /**
- * Proprietary tone, general double beep: twice 400Hz+1200Hz, 35ms ON, 200ms OFF, 35ms ON
+ public static final int TONE_CDMA_NETWORK_BUSY = 40;
+ /**
+ * CDMA Confirm tone: 350Hz+440Hz 100ms ON, 100ms OFF repeated for 3 times
*
* @see #ToneGenerator(int, int)
+ */
+ public static final int TONE_CDMA_CONFIRM = 41;
+ /**
*
- * @hide
+ * CDMA answer tone: silent tone - defintion Frequency 0, 0ms ON, 0ms OFF
+ * @see #ToneGenerator(int, int)
*/
- public static final int TONE_CDMA_ABBR_REORDER = 37;
-
- /**
- * Proprietary tone, general double beep: twice 400Hz+1200Hz, 35ms ON, 200ms OFF, 35ms ON
+ public static final int TONE_CDMA_ANSWER = 42;
+ /**
*
+ * CDMA Network Callwaiting tone: 440Hz 300ms ON
* @see #ToneGenerator(int, int)
+ */
+ public static final int TONE_CDMA_NETWORK_CALLWAITING = 43;
+ /**
+ * CDMA PIP tone: 480Hz 100ms ON, 100ms OFF repeated for 4 times
*
- * @hide
+ * @see #ToneGenerator(int, int)
*/
- public static final int TONE_CDMA_NETWORK_BUSY = 38;
-
-
- /**
- * Proprietary tone, general double beep: twice 400Hz+1200Hz, 35ms ON, 200ms OFF, 35ms ON
+ public static final int TONE_CDMA_PIP = 44;
+ /**
+ * ISDN Call Signal Normal tone: {2091Hz 32ms ON, 2556 64ms ON} 20 times,
+ * 2091 32ms ON, 2556 48ms ON, 4s OFF
*
* @see #ToneGenerator(int, int)
+ */
+ public static final int TONE_CDMA_CALL_SIGNAL_ISDN_NORMAL = 45;
+ /**
+ * ISDN Call Signal Intergroup tone: {2091Hz 32ms ON, 2556 64ms ON} 8 times,
+ * 2091Hz 32ms ON, 400ms OFF, {2091Hz 32ms ON, 2556Hz 64ms ON} times,
+ * 2091Hz 32ms ON, 4s OFF.
*
- * @hide
+ * @see #ToneGenerator(int, int)
*/
- public static final int TONE_CDMA_ANSWER = 39;
-
- /**
- * Proprietary tone, general double beep: twice 400Hz+1200Hz, 35ms ON, 200ms OFF, 35ms ON
+ public static final int TONE_CDMA_CALL_SIGNAL_ISDN_INTERGROUP = 46;
+ /**
+ * ISDN Call Signal SP PRI tone:{2091Hz 32ms ON, 2556 64ms ON} 4 times
+ * 2091Hz 16ms ON, 200ms OFF, {2091Hz 32ms ON, 2556Hz 64ms ON} 4 times,
+ * 2091Hz 16ms ON, 200ms OFF
*
* @see #ToneGenerator(int, int)
+ */
+ public static final int TONE_CDMA_CALL_SIGNAL_ISDN_SP_PRI = 47;
+ /**
+ * ISDN Call sign PAT3 tone: silent tone
*
- * @hide
+ * @see #ToneGenerator(int, int)
*/
- public static final int TONE_CDMA_NETWORK_CALLWAITING = 40;
-
- /**
- * Proprietary tone, general double beep: twice 400Hz+1200Hz, 35ms ON, 200ms OFF, 35ms ON
+ public static final int TONE_CDMA_CALL_SIGNAL_ISDN_PAT3 = 48;
+ /**
+ * ISDN Ping Ring tone: {2091Hz 32ms ON, 2556Hz 64ms ON} 5 times
+ * 2091Hz 20ms ON
*
* @see #ToneGenerator(int, int)
+ */
+ public static final int TONE_CDMA_CALL_SIGNAL_ISDN_PING_RING = 49;
+ /**
*
- * @hide
+ * ISDN Pat5 tone: silent tone
+ * @see #ToneGenerator(int, int)
*/
- public static final int TONE_CDMA_PIP = 41;
-
-
+ public static final int TONE_CDMA_CALL_SIGNAL_ISDN_PAT5 = 50;
/**
- * Proprietary tone, general double beep: twice 400Hz+1200Hz, 35ms ON, 200ms OFF, 35ms ON
*
+ * ISDN Pat6 tone: silent tone
* @see #ToneGenerator(int, int)
+ */
+ public static final int TONE_CDMA_CALL_SIGNAL_ISDN_PAT6 = 51;
+ /**
+ * ISDN Pat7 tone: silent tone
*
- * @hide
+ * @see #ToneGenerator(int, int)
*/
- public static final int TONE_CDMA_CALL_SIGNAL_ISDN_NORMAL = 42;
-
+ public static final int TONE_CDMA_CALL_SIGNAL_ISDN_PAT7 = 52;
/**
- * Proprietary tone, general double beep: twice 400Hz+1200Hz, 35ms ON, 200ms OFF, 35ms ON
+ * TONE_CDMA_HIGH_L tone: {3700Hz 25ms, 4000Hz 25ms} 40 times
+ * 4000ms OFF, Repeat ....
*
* @see #ToneGenerator(int, int)
+ */
+ public static final int TONE_CDMA_HIGH_L = 53;
+ /**
+ * TONE_CDMA_MED_L tone: {2600Hz 25ms, 2900Hz 25ms} 40 times
+ * 4000ms OFF, Repeat ....
*
- * @hide
+ * @see #ToneGenerator(int, int)
*/
- public static final int TONE_CDMA_CALL_SIGNAL_ISDN_INTERGROUP = 43;
-
- /**
- * Proprietary tone, general double beep: twice 400Hz+1200Hz, 35ms ON, 200ms OFF, 35ms ON
+ public static final int TONE_CDMA_MED_L = 54;
+ /**
+ * TONE_CDMA_LOW_L tone: {1300Hz 25ms, 1450Hz 25ms} 40 times,
+ * 4000ms OFF, Repeat ....
*
* @see #ToneGenerator(int, int)
+ */
+ public static final int TONE_CDMA_LOW_L = 55;
+ /**
+ * CDMA HIGH SS tone: {3700Hz 25ms, 4000Hz 25ms} repeat 16 times,
+ * 400ms OFF, repeat ....
*
- * @hide
+ * @see #ToneGenerator(int, int)
*/
- public static final int TONE_CDMA_CALL_SIGNAL_SP_PRI = 44;
-
+ public static final int TONE_CDMA_HIGH_SS = 56;
/**
- * Proprietary tone, general double beep: twice 400Hz+1200Hz, 35ms ON, 200ms OFF, 35ms ON
+ * CDMA MED SS tone: {2600Hz 25ms, 2900Hz 25ms} repeat 16 times,
+ * 400ms OFF, repeat ....
*
* @see #ToneGenerator(int, int)
+ */
+ public static final int TONE_CDMA_MED_SS = 57;
+ /**
+ * CDMA LOW SS tone: {1300z 25ms, 1450Hz 25ms} repeat 16 times,
+ * 400ms OFF, repeat ....
*
- * @hide
+ * @see #ToneGenerator(int, int)
*/
- public static final int TONE_CDMA_CALL_SIGNAL_ISDN_PAT3 = 45;
-
+ public static final int TONE_CDMA_LOW_SS = 58;
/**
- * Proprietary tone, general double beep: twice 400Hz+1200Hz, 35ms ON, 200ms OFF, 35ms ON
+ * CDMA HIGH SSL tone: {3700Hz 25ms, 4000Hz 25ms} 8 times,
+ * 200ms OFF, {3700Hz 25ms, 4000Hz 25ms} repeat 8 times,
+ * 200ms OFF, {3700Hz 25ms, 4000Hz 25ms} repeat 16 times,
+ * 4000ms OFF, repeat ...
*
* @see #ToneGenerator(int, int)
+ */
+ public static final int TONE_CDMA_HIGH_SSL = 59;
+ /**
+ * CDMA MED SSL tone: {2600Hz 25ms, 2900Hz 25ms} 8 times,
+ * 200ms OFF, {2600Hz 25ms, 2900Hz 25ms} repeat 8 times,
+ * 200ms OFF, {2600Hz 25ms, 2900Hz 25ms} repeat 16 times,
+ * 4000ms OFF, repeat ...
*
- * @hide
+ * @see #ToneGenerator(int, int)
*/
- public static final int TONE_CDMA_CALL_SIGNAL_ISDN_RING_RING = 46;
-
+ public static final int TONE_CDMA_MED_SSL = 60;
/**
- * Proprietary tone, general double beep: twice 400Hz+1200Hz, 35ms ON, 200ms OFF, 35ms ON
+ * CDMA LOW SSL tone: {1300Hz 25ms, 1450Hz 25ms} 8 times,
+ * 200ms OFF, {1300Hz 25ms, 1450Hz 25ms} repeat 8 times,
+ * 200ms OFF, {1300Hz 25ms, 1450Hz 25ms} repeat 16 times,
+ * 4000ms OFF, repeat ...
*
* @see #ToneGenerator(int, int)
+ */
+ public static final int TONE_CDMA_LOW_SSL = 61;
+ /**
+ * CDMA HIGH SS2 tone: {3700Hz 25ms, 4000Hz 25ms} 20 times,
+ * 1000ms OFF, {3700Hz 25ms, 4000Hz 25ms} 20 times,
+ * 3000ms OFF, repeat ....
*
- * @hide
+ * @see #ToneGenerator(int, int)
*/
- public static final int TONE_CDMA_CALL_SIGNAL_ISDN_PAT5 = 47;
-
+ public static final int TONE_CDMA_HIGH_SS_2 = 62;
/**
- * general double beep: twice 400Hz+1200Hz, 35ms ON, 200ms OFF, 35ms ON
+ * CDMA MED SS2 tone: {2600Hz 25ms, 2900Hz 25ms} 20 times,
+ * 1000ms OFF, {2600Hz 25ms, 2900Hz 25ms} 20 times,
+ * 3000ms OFF, repeat ....
*
* @see #ToneGenerator(int, int)
+ */
+ public static final int TONE_CDMA_MED_SS_2 = 63;
+ /**
+ * CDMA LOW SS2 tone: {1300Hz 25ms, 1450Hz 25ms} 20 times,
+ * 1000ms OFF, {1300Hz 25ms, 1450Hz 25ms} 20 times,
+ * 3000ms OFF, repeat ....
*
- * @hide
+ * @see #ToneGenerator(int, int)
*/
- public static final int TONE_CDMA_CALL_SIGNAL_ISDN_PAT6 = 48;
-
+ public static final int TONE_CDMA_LOW_SS_2 = 64;
/**
- * general double beep: twice 400Hz+1200Hz, 35ms ON, 200ms OFF, 35ms ON
+ * CDMA HIGH SLS tone: {3700Hz 25ms, 4000Hz 25ms} 10 times,
+ * 500ms OFF, {3700Hz 25ms, 4000Hz 25ms} 20 times, 500ms OFF,
+ * {3700Hz 25ms, 4000Hz 25ms} 10 times, 3000ms OFF, REPEAT
*
* @see #ToneGenerator(int, int)
+ */
+ public static final int TONE_CDMA_HIGH_SLS = 65;
+ /**
+ * CDMA MED SLS tone: {2600Hz 25ms, 2900Hz 25ms} 10 times,
+ * 500ms OFF, {2600Hz 25ms, 2900Hz 25ms} 20 times, 500ms OFF,
+ * {2600Hz 25ms, 2900Hz 25ms} 10 times, 3000ms OFF, REPEAT
*
- * @hide
+ *
+ * @see #ToneGenerator(int, int)
*/
- public static final int TONE_CDMA_CALL_SIGNAL_ISDN_PAT7 = 49;
-
- // TODO(Moto): Need comments for each one and we need ToneGenerator.cpp/ToneGenerator.h
-
- /** @hide */
- public static final int TONE_CDMA_HIGH_L = 50;
-
- /** @hide */
- public static final int TONE_CDMA_LOW_L = 51;
- /** @hide */
- public static final int TONE_CDMA_HIGH_SS = 52;
- /** @hide */
- public static final int TONE_CDMA_MED_SS = 53;
- /** @hide */
- public static final int TONE_CDMA_LOW_SS = 54;
- /** @hide */
- public static final int TONE_CDMA_HIGH_SSL = 55;
-
-
- /** @hide */
- public static final int TONE_CDMA_MED_SSL = 56;
- /** @hide */
- public static final int TONE_CDMA_LOW_SSL = 57;
- /** @hide */
- public static final int TONE_CDMA_HIGH_SS_2 = 58;
- /** @hide */
- public static final int TONE_CDMA_MED_SS_2 = 59;
- /** @hide */
- public static final int TONE_CDMA_LOW_SS_2 = 60;
- /** @hide */
- public static final int TONE_CDMA_HIGH_SLS = 61;
- /** @hide */
- public static final int TONE_CDMA_MED_SLS = 62;
- /** @hide */
- public static final int TONE_CDMA_LOW_SLS = 63;
- /** @hide */
- public static final int TONE_CDMA_HIGH_S_X4 = 64;
- /** @hide */
- public static final int TONE_CDMA_MED_S_X4 = 65;
- /** @hide */
- public static final int TONE_CDMA_LOW_S_X4 = 66;
- /** @hide */
- public static final int TONE_CDMA_HIGH_PBX_L = 67;
- /** @hide */
- public static final int TONE_CDMA_MED_PBX_L = 68;
- /** @hide */
- public static final int TONE_CDMA_LOW_PBX_L = 69;
- /** @hide */
- public static final int TONE_CDMA_HIGH_PBX_SS = 70;
- /** @hide */
- public static final int TONE_CDMA_MED_PBX_SS = 71;
- /** @hide */
- public static final int TONE_CDMA_LOW_PBX_SS = 72;
- /** @hide */
- public static final int TONE_CDMA_HIGH_PBX_SSL = 73;
- /** @hide */
- public static final int TONE_CDMA_MED_PBX_SSL = 74;
-
- /** @hide */
- public static final int TONE_CDMA_LOW_PBX_SSL = 75;
- /** @hide */
- public static final int TONE_CDMA_HIGH_PBX_SLS = 76;
- /** @hide */
- public static final int TONE_CDMA_MED_PBX_SLS = 77;
- /** @hide */
- public static final int TONE_CDMA_LOW_PBX_SLS = 78;
- /** @hide */
- public static final int TONE_CDMA_HIGH_PBX_S_X4 = 79;
- /** @hide */
- public static final int TONE_CDMA_MED_PBX_S_X4 = 80;
- /** @hide */
- public static final int TONE_CDMA_LOW_PBX_S_X4 = 81;
- /** @hide */
- public static final int TONE_CDMA_INTERCEPT_ONE_SHOT = TONE_SUP_INTERCEPT_ABBREV;
- /** @hide */
- public static final int TONE_CDMA_REORDER_ONE_SHOT = TONE_CDMA_ABBR_REORDER;
- /** @hide */
- public static final int TONE_CDMA_NETWORK_BUSY_ONE_SHOT = 82;
- /** @hide */
- public static final int TONE_CDMA_ABBR_ALERT = 83;
- /** @hide */
- public static final int TONE_CDMA_SIGNAL_OFF = 84;
- /** @hide */
- public static final int TONE_CDMA_INVALID = 85;
+ public static final int TONE_CDMA_MED_SLS = 66;
+ /**
+ * CDMA LOW SLS tone: {1300Hz 25ms, 1450Hz 25ms} 10 times,
+ * 500ms OFF, {1300Hz 25ms, 1450Hz 25ms} 20 times, 500ms OFF,
+ * {1300Hz 25ms, 1450Hz 25ms} 10 times, 3000ms OFF, REPEAT
+ *
+ * @see #ToneGenerator(int, int)
+ */
+ public static final int TONE_CDMA_LOW_SLS = 67;
+ /**
+ * CDMA HIGH S X4 tone: {3700Hz 25ms, 4000Hz 25ms} 10 times,
+ * 500ms OFF, {3700Hz 25ms, 4000Hz 25ms} 10 times, 500ms OFF,
+ * {3700Hz 25ms, 4000Hz 25ms} 10 times, 500ms OFF,
+ * {3700Hz 25ms, 4000Hz 25ms} 10 times, 2500ms OFF, REPEAT....
+ *
+ * @see #ToneGenerator(int, int)
+ */
+ public static final int TONE_CDMA_HIGH_S_X4 = 68;
+ /**
+ * CDMA MED S X4 tone: {2600Hz 25ms, 2900Hz 25ms} 10 times,
+ * 500ms OFF, {2600Hz 25ms, 2900Hz 25ms} 10 times, 500ms OFF,
+ * {2600Hz 25ms, 2900Hz 25ms} 10 times, 500ms OFF,
+ * {2600Hz 25ms, 2900Hz 25ms} 10 times, 2500ms OFF, REPEAT....
+ *
+ * @see #ToneGenerator(int, int)
+ */
+ public static final int TONE_CDMA_MED_S_X4 = 69;
+ /**
+ * CDMA LOW S X4 tone: {2600Hz 25ms, 2900Hz 25ms} 10 times,
+ * 500ms OFF, {2600Hz 25ms, 2900Hz 25ms} 10 times, 500ms OFF,
+ * {2600Hz 25ms, 2900Hz 25ms} 10 times, 500ms OFF,
+ * {2600Hz 25ms, 2900Hz 25ms} 10 times, 2500ms OFF, REPEAT....
+ *
+ *
+ * @see #ToneGenerator(int, int)
+ */
+ public static final int TONE_CDMA_LOW_S_X4 = 70;
+ /**
+ * CDMA HIGH PBX L: {3700Hz 25ms, 4000Hz 25ms}20 times,
+ * 2000ms OFF, REPEAT....
+ *
+ * @see #ToneGenerator(int, int)
+ */
+ public static final int TONE_CDMA_HIGH_PBX_L = 71;
+ /**
+ * CDMA MED PBX L: {2600Hz 25ms, 2900Hz 25ms}20 times,
+ * 2000ms OFF, REPEAT....
+ *
+ * @see #ToneGenerator(int, int)
+ */
+ public static final int TONE_CDMA_MED_PBX_L = 72;
+ /**
+ * CDMA LOW PBX L: {1300Hz 25ms,1450Hz 25ms}20 times,
+ * 2000ms OFF, REPEAT....
+ *
+ * @see #ToneGenerator(int, int)
+ */
+ public static final int TONE_CDMA_LOW_PBX_L = 73;
+ /**
+ * CDMA HIGH PBX SS tone: {3700Hz 25ms, 4000Hz 25ms} 8 times
+ * 200 ms OFF, {3700Hz 25ms 4000Hz 25ms}8 times,
+ * 2000ms OFF, REPEAT....
+ *
+ * @see #ToneGenerator(int, int)
+ */
+ public static final int TONE_CDMA_HIGH_PBX_SS = 74;
+ /**
+ * CDMA MED PBX SS tone: {2600Hz 25ms, 2900Hz 25ms} 8 times
+ * 200 ms OFF, {2600Hz 25ms 2900Hz 25ms}8 times,
+ * 2000ms OFF, REPEAT....
+ *
+ * @see #ToneGenerator(int, int)
+ */
+ public static final int TONE_CDMA_MED_PBX_SS = 75;
+ /**
+ * CDMA LOW PBX SS tone: {1300Hz 25ms, 1450Hz 25ms} 8 times
+ * 200 ms OFF, {1300Hz 25ms 1450Hz 25ms}8 times,
+ * 2000ms OFF, REPEAT....
+ *
+ * @see #ToneGenerator(int, int)
+ */
+ public static final int TONE_CDMA_LOW_PBX_SS = 76;
+ /**
+ * CDMA HIGH PBX SSL tone:{3700Hz 25ms, 4000Hz 25ms} 8 times
+ * 200ms OFF, {3700Hz 25ms, 4000Hz 25ms} 8 times, 200ms OFF,
+ * {3700Hz 25ms, 4000Hz 25ms} 16 times, 1000ms OFF, REPEAT....
+ *
+ * @see #ToneGenerator(int, int)
+ */
+ public static final int TONE_CDMA_HIGH_PBX_SSL = 77;
+ /**
+ * CDMA MED PBX SSL tone:{2600Hz 25ms, 2900Hz 25ms} 8 times
+ * 200ms OFF, {2600Hz 25ms, 2900Hz 25ms} 8 times, 200ms OFF,
+ * {2600Hz 25ms, 2900Hz 25ms} 16 times, 1000ms OFF, REPEAT....
+ *
+ * @see #ToneGenerator(int, int)
+ */
+ public static final int TONE_CDMA_MED_PBX_SSL = 78;
+ /**
+ * CDMA LOW PBX SSL tone:{1300Hz 25ms, 1450Hz 25ms} 8 times
+ * 200ms OFF, {1300Hz 25ms, 1450Hz 25ms} 8 times, 200ms OFF,
+ * {1300Hz 25ms, 1450Hz 25ms} 16 times, 1000ms OFF, REPEAT....
+ *
+ *
+ * @see #ToneGenerator(int, int)
+ */
+ public static final int TONE_CDMA_LOW_PBX_SSL = 79;
+ /**
+ * CDMA HIGH PBX SSL tone:{3700Hz 25ms, 4000Hz 25ms} 8 times
+ * 200ms OFF, {3700Hz 25ms, 4000Hz 25ms} 16 times, 200ms OFF,
+ * {3700Hz 25ms, 4000Hz 25ms} 8 times, 1000ms OFF, REPEAT....
+ *
+ * @see #ToneGenerator(int, int)
+ */
+ public static final int TONE_CDMA_HIGH_PBX_SLS = 80;
+ /**
+ * CDMA HIGH PBX SLS tone:{2600Hz 25ms, 2900Hz 25ms} 8 times
+ * 200ms OFF, {2600Hz 25ms, 2900Hz 25ms} 16 times, 200ms OFF,
+ * {2600Hz 25ms, 2900Hz 25ms} 8 times, 1000ms OFF, REPEAT....
+ *
+ * @see #ToneGenerator(int, int)
+ */
+ public static final int TONE_CDMA_MED_PBX_SLS = 81;
+ /**
+ * CDMA HIGH PBX SLS tone:{1300Hz 25ms, 1450Hz 25ms} 8 times
+ * 200ms OFF, {1300Hz 25ms, 1450Hz 25ms} 16 times, 200ms OFF,
+ * {1300Hz 25ms, 1450Hz 25ms} 8 times, 1000ms OFF, REPEAT....
+ *
+ * @see #ToneGenerator(int, int)
+ */
+ public static final int TONE_CDMA_LOW_PBX_SLS = 82;
+ /**
+ * CDMA HIGH PBX X S4 tone: {3700Hz 25ms 4000Hz 25ms} 8 times,
+ * 200ms OFF, {3700Hz 25ms 4000Hz 25ms} 8 times, 200ms OFF,
+ * {3700Hz 25ms 4000Hz 25ms} 8 times, 200ms OFF,
+ * {3700Hz 25ms 4000Hz 25ms} 8 times, 800ms OFF, REPEAT...
+ *
+ * @see #ToneGenerator(int, int)
+ */
+ public static final int TONE_CDMA_HIGH_PBX_S_X4 = 83;
+ /**
+ * CDMA MED PBX X S4 tone: {2600Hz 25ms 2900Hz 25ms} 8 times,
+ * 200ms OFF, {2600Hz 25ms 2900Hz 25ms} 8 times, 200ms OFF,
+ * {2600Hz 25ms 2900Hz 25ms} 8 times, 200ms OFF,
+ * {2600Hz 25ms 2900Hz 25ms} 8 times, 800ms OFF, REPEAT...
+ *
+ * @see #ToneGenerator(int, int)
+ */
+ public static final int TONE_CDMA_MED_PBX_S_X4 = 84;
+ /**
+ * CDMA LOW PBX X S4 tone: {1300Hz 25ms 1450Hz 25ms} 8 times,
+ * 200ms OFF, {1300Hz 25ms 1450Hz 25ms} 8 times, 200ms OFF,
+ * {1300Hz 25ms 1450Hz 25ms} 8 times, 200ms OFF,
+ * {1300Hz 25ms 1450Hz 25ms} 8 times, 800ms OFF, REPEAT...
+ *
+ * @see #ToneGenerator(int, int)
+ */
+ public static final int TONE_CDMA_LOW_PBX_S_X4 = 85;
+ /**
+ * CDMA Alert Network Lite tone: 1109Hz 62ms ON, 784Hz 62ms ON, 740Hz 62ms ON
+ * 622Hz 62ms ON, 1109Hz 62ms ON
+ *
+ * @see #ToneGenerator(int, int)
+ */
+ public static final int TONE_CDMA_ALERT_NETWORK_LITE = 86;
+ /**
+ * CDMA Alert Auto Redial tone: {1245Hz 62ms ON, 659Hz 62ms ON} 3 times,
+ * 1245 62ms ON
+ *
+ * @see #ToneGenerator(int, int)
+ */
+ public static final int TONE_CDMA_ALERT_AUTOREDIAL_LITE = 87;
+ /**
+ * CDMA One Min Beep tone: 1150Hz+770Hz 400ms ON
+ *
+ * @see #ToneGenerator(int, int)
+ */
+ public static final int TONE_CDMA_ONE_MIN_BEEP = 88;
+ /**
+ *
+ * CDMA KEYPAD Volume key lite tone: 941Hz+1477Hz 120ms ON
+ * @see #ToneGenerator(int, int)
+ */
+ public static final int TONE_CDMA_KEYPAD_VOLUME_KEY_LITE = 89;
+ /**
+ * CDMA PRESSHOLDKEY LITE tone: 587Hz 375ms ON, 1175Hz 125ms ON
+ *
+ * @see #ToneGenerator(int, int)
+ */
+ public static final int TONE_CDMA_PRESSHOLDKEY_LITE = 90;
+ /**
+ * CDMA ALERT INCALL LITE tone: 587Hz 62ms, 784 62ms, 831Hz 62ms,
+ * 784Hz 62ms, 1109 62ms, 784Hz 62ms, 831Hz 62ms, 784Hz 62ms
+ *
+ * @see #ToneGenerator(int, int)
+ */
+ public static final int TONE_CDMA_ALERT_INCALL_LITE = 91;
+ /**
+ * CDMA EMERGENCY RINGBACK tone: {941Hz 125ms ON, 10ms OFF} 3times
+ * 4990ms OFF, REPEAT...
+ *
+ * @see #ToneGenerator(int, int)
+ */
+ public static final int TONE_CDMA_EMERGENCY_RINGBACK = 92;
+ /**
+ * CDMA ALERT CALL GUARD tone: {1319Hz 125ms ON, 125ms OFF} 3 times
+ *
+ * @see #ToneGenerator(int, int)
+ */
+ public static final int TONE_CDMA_ALERT_CALL_GUARD = 93;
+ /**
+ * CDMA SOFT ERROR LITE tone: 1047Hz 125ms ON, 370Hz 125ms
+ *
+ * @see #ToneGenerator(int, int)
+ */
+ public static final int TONE_CDMA_SOFT_ERROR_LITE = 94;
+ /**
+ * CDMA CALLDROP LITE tone: 1480Hz 125ms, 1397Hz 125ms, 784Hz 125ms
+ *
+ * @see #ToneGenerator(int, int)
+ */
+ public static final int TONE_CDMA_CALLDROP_LITE = 95;
+ /**
+ * CDMA_NETWORK_BUSY_ONE_SHOT tone: 425Hz 500ms ON, 500ms OFF.
+ *
+ * @see #ToneGenerator(int, int)
+ */
+ public static final int TONE_CDMA_NETWORK_BUSY_ONE_SHOT = 96;
+ /**
+ * CDMA_ABBR_ALERT tone: 1150Hz+770Hz 400ms ON
+ * @see #ToneGenerator(int, int)
+ */
+ public static final int TONE_CDMA_ABBR_ALERT = 97;
+ /**
+ * CDMA_SIGNAL_OFF - silent tone
+ *
+ * @see #ToneGenerator(int, int)
+ */
+ public static final int TONE_CDMA_SIGNAL_OFF = 98;
/** Maximum volume, for use with {@link #ToneGenerator(int,int)} */
public static final int MAX_VOLUME = AudioSystem.MAX_VOLUME;
@@ -546,6 +778,71 @@ public class ToneGenerator
* <li>{@link #TONE_SUP_CONGESTION_ABBREV}
* <li>{@link #TONE_SUP_CONFIRM}
* <li>{@link #TONE_SUP_PIP}
+ * <li>{@link #TONE_CDMA_DIAL_TONE_LITE}
+ * <li>{@link #TONE_CDMA_NETWORK_USA_RINGBACK}
+ * <li>{@link #TONE_CDMA_INTERCEPT}
+ * <li>{@link #TONE_CDMA_ABBR_INTERCEPT}
+ * <li>{@link #TONE_CDMA_REORDER}
+ * <li>{@link #TONE_CDMA_ABBR_REORDER}
+ * <li>{@link #TONE_CDMA_NETWORK_BUSY}
+ * <li>{@link #TONE_CDMA_CONFIRM}
+ * <li>{@link #TONE_CDMA_ANSWER}
+ * <li>{@link #TONE_CDMA_NETWORK_CALLWAITING}
+ * <li>{@link #TONE_CDMA_PIP}
+ * <li>{@link #TONE_CDMA_CALL_SIGNAL_ISDN_NORMAL}
+ * <li>{@link #TONE_CDMA_CALL_SIGNAL_ISDN_INTERGROUP}
+ * <li>{@link #TONE_CDMA_CALL_SIGNAL_ISDN_SP_PRI}
+ * <li>{@link #TONE_CDMA_CALL_SIGNAL_ISDN_PAT3}
+ * <li>{@link #TONE_CDMA_CALL_SIGNAL_ISDN_PING_RING}
+ * <li>{@link #TONE_CDMA_CALL_SIGNAL_ISDN_PAT5}
+ * <li>{@link #TONE_CDMA_CALL_SIGNAL_ISDN_PAT6}
+ * <li>{@link #TONE_CDMA_CALL_SIGNAL_ISDN_PAT7}
+ * <li>{@link #TONE_CDMA_HIGH_L}
+ * <li>{@link #TONE_CDMA_MED_L}
+ * <li>{@link #TONE_CDMA_LOW_L}
+ * <li>{@link #TONE_CDMA_HIGH_SS}
+ * <li>{@link #TONE_CDMA_MED_SS}
+ * <li>{@link #TONE_CDMA_LOW_SS}
+ * <li>{@link #TONE_CDMA_HIGH_SSL}
+ * <li>{@link #TONE_CDMA_MED_SSL}
+ * <li>{@link #TONE_CDMA_LOW_SSL}
+ * <li>{@link #TONE_CDMA_HIGH_SS_2}
+ * <li>{@link #TONE_CDMA_MED_SS_2}
+ * <li>{@link #TONE_CDMA_LOW_SS_2}
+ * <li>{@link #TONE_CDMA_HIGH_SLS}
+ * <li>{@link #TONE_CDMA_MED_SLS}
+ * <li>{@link #TONE_CDMA_LOW_SLS}
+ * <li>{@link #TONE_CDMA_HIGH_S_X4}
+ * <li>{@link #TONE_CDMA_MED_S_X4}
+ * <li>{@link #TONE_CDMA_LOW_S_X4}
+ * <li>{@link #TONE_CDMA_HIGH_PBX_L}
+ * <li>{@link #TONE_CDMA_MED_PBX_L}
+ * <li>{@link #TONE_CDMA_LOW_PBX_L}
+ * <li>{@link #TONE_CDMA_HIGH_PBX_SS}
+ * <li>{@link #TONE_CDMA_MED_PBX_SS}
+ * <li>{@link #TONE_CDMA_LOW_PBX_SS}
+ * <li>{@link #TONE_CDMA_HIGH_PBX_SSL}
+ * <li>{@link #TONE_CDMA_MED_PBX_SSL}
+ * <li>{@link #TONE_CDMA_LOW_PBX_SSL}
+ * <li>{@link #TONE_CDMA_HIGH_PBX_SLS}
+ * <li>{@link #TONE_CDMA_MED_PBX_SLS}
+ * <li>{@link #TONE_CDMA_LOW_PBX_SLS}
+ * <li>{@link #TONE_CDMA_HIGH_PBX_S_X4}
+ * <li>{@link #TONE_CDMA_MED_PBX_S_X4}
+ * <li>{@link #TONE_CDMA_LOW_PBX_S_X4}
+ * <li>{@link #TONE_CDMA_ALERT_NETWORK_LITE}
+ * <li>{@link #TONE_CDMA_ALERT_AUTOREDIAL_LITE}
+ * <li>{@link #TONE_CDMA_ONE_MIN_BEEP}
+ * <li>{@link #TONE_CDMA_KEYPAD_VOLUME_KEY_LITE}
+ * <li>{@link #TONE_CDMA_PRESSHOLDKEY_LITE}
+ * <li>{@link #TONE_CDMA_ALERT_INCALL_LITE}
+ * <li>{@link #TONE_CDMA_EMERGENCY_RINGBACK}
+ * <li>{@link #TONE_CDMA_ALERT_CALL_GUARD}
+ * <li>{@link #TONE_CDMA_SOFT_ERROR_LITE}
+ * <li>{@link #TONE_CDMA_CALLDROP_LITE}
+ * <li>{@link #TONE_CDMA_NETWORK_BUSY_ONE_SHOT}
+ * <li>{@link #TONE_CDMA_ABBR_ALERT}
+ * <li>{@link #TONE_CDMA_SIGNAL_OFF}
* </ul>
* @see #ToneGenerator(int, int)
*/
@@ -566,7 +863,7 @@ public class ToneGenerator
private native final void native_setup(int streamType, int volume);
private native final void native_finalize();
-
+
@Override
protected void finalize() { native_finalize(); }
diff --git a/media/libmedia/ToneGenerator.cpp b/media/libmedia/ToneGenerator.cpp
index 81ee92c..c22cd53 100644
--- a/media/libmedia/ToneGenerator.cpp
+++ b/media/libmedia/ToneGenerator.cpp
@@ -33,199 +33,720 @@ namespace android {
// Descriptors for all available tones (See ToneGenerator::ToneDescriptor class declaration for details)
const ToneGenerator::ToneDescriptor ToneGenerator::sToneDescriptors[] = {
- { segments: {{ duration: ToneGenerator::TONEGEN_INF, waveFreq: { 1336, 941, 0 }},
- { duration: 0 , waveFreq: { 0 }}},
+ { segments: {{ duration: ToneGenerator::TONEGEN_INF, waveFreq: { 1336, 941, 0 }, 0, 0},
+ { duration: 0 , waveFreq: { 0 }, 0, 0}},
repeatCnt: ToneGenerator::TONEGEN_INF,
repeatSegment: 0 }, // TONE_DTMF_0
- { segments: { { duration: ToneGenerator::TONEGEN_INF, waveFreq: { 1209, 697, 0 } },
- { duration: 0 , waveFreq: { 0 }}},
+ { segments: { { duration: ToneGenerator::TONEGEN_INF, waveFreq: { 1209, 697, 0 }, 0, 0 },
+ { duration: 0 , waveFreq: { 0 }, 0, 0}},
repeatCnt: ToneGenerator::TONEGEN_INF,
repeatSegment: 0 }, // TONE_DTMF_1
- { segments: { { duration: ToneGenerator::TONEGEN_INF, waveFreq: { 1336, 697, 0 } },
- { duration: 0 , waveFreq: { 0 }}},
+ { segments: { { duration: ToneGenerator::TONEGEN_INF, waveFreq: { 1336, 697, 0 }, 0, 0 },
+ { duration: 0 , waveFreq: { 0 }, 0, 0}},
repeatCnt: ToneGenerator::TONEGEN_INF,
repeatSegment: 0 }, // TONE_DTMF_2
- { segments: { { duration: ToneGenerator::TONEGEN_INF, waveFreq: { 1477, 697, 0 } },
- { duration: 0 , waveFreq: { 0 }}},
+ { segments: { { duration: ToneGenerator::TONEGEN_INF, waveFreq: { 1477, 697, 0 }, 0, 0 },
+ { duration: 0 , waveFreq: { 0 }, 0, 0}},
repeatCnt: ToneGenerator::TONEGEN_INF,
repeatSegment: 0 }, // TONE_DTMF_3
- { segments: { { duration: ToneGenerator::TONEGEN_INF, waveFreq: { 1209, 770, 0 } },
- { duration: 0 , waveFreq: { 0 }}},
+ { segments: { { duration: ToneGenerator::TONEGEN_INF, waveFreq: { 1209, 770, 0 }, 0, 0 },
+ { duration: 0 , waveFreq: { 0 }, 0, 0}},
repeatCnt: ToneGenerator::TONEGEN_INF,
repeatSegment: 0 }, // TONE_DTMF_4
- { segments: { { duration: ToneGenerator::TONEGEN_INF, waveFreq: { 1336, 770, 0 } },
- { duration: 0 , waveFreq: { 0 }}},
+ { segments: { { duration: ToneGenerator::TONEGEN_INF, waveFreq: { 1336, 770, 0 }, 0, 0 },
+ { duration: 0 , waveFreq: { 0 }, 0, 0}},
repeatCnt: ToneGenerator::TONEGEN_INF,
repeatSegment: 0 }, // TONE_DTMF_5
- { segments: { { duration: ToneGenerator::TONEGEN_INF, waveFreq: { 1477, 770, 0 } },
- { duration: 0 , waveFreq: { 0 }}},
+ { segments: { { duration: ToneGenerator::TONEGEN_INF, waveFreq: { 1477, 770, 0 }, 0, 0 },
+ { duration: 0 , waveFreq: { 0 }, 0, 0}},
repeatCnt: ToneGenerator::TONEGEN_INF,
repeatSegment: 0 }, // TONE_DTMF_6
- { segments: { { duration: ToneGenerator::TONEGEN_INF, waveFreq: { 1209, 852, 0 } },
- { duration: 0 , waveFreq: { 0 }}},
+ { segments: { { duration: ToneGenerator::TONEGEN_INF, waveFreq: { 1209, 852, 0 }, 0, 0 },
+ { duration: 0 , waveFreq: { 0 }, 0, 0}},
repeatCnt: ToneGenerator::TONEGEN_INF,
repeatSegment: 0 }, // TONE_DTMF_7
- { segments: { { duration: ToneGenerator::TONEGEN_INF, waveFreq: { 1336, 852, 0 } },
- { duration: 0 , waveFreq: { 0 }}},
+ { segments: { { duration: ToneGenerator::TONEGEN_INF, waveFreq: { 1336, 852, 0 }, 0, 0 },
+ { duration: 0 , waveFreq: { 0 }, 0, 0}},
repeatCnt: ToneGenerator::TONEGEN_INF,
repeatSegment: 0 }, // TONE_DTMF_8
- { segments: { { duration: ToneGenerator::TONEGEN_INF, waveFreq: { 1477, 852, 0 } },
- { duration: 0 , waveFreq: { 0 }}},
+ { segments: { { duration: ToneGenerator::TONEGEN_INF, waveFreq: { 1477, 852, 0 }, 0, 0 },
+ { duration: 0 , waveFreq: { 0 }, 0, 0}},
repeatCnt: ToneGenerator::TONEGEN_INF,
repeatSegment: 0 }, // TONE_DTMF_9
- { segments: { { duration: ToneGenerator::TONEGEN_INF, waveFreq: { 1209, 941, 0 } },
- { duration: 0 , waveFreq: { 0 }}},
+ { segments: { { duration: ToneGenerator::TONEGEN_INF, waveFreq: { 1209, 941, 0 }, 0, 0 },
+ { duration: 0 , waveFreq: { 0 }, 0, 0}},
repeatCnt: ToneGenerator::TONEGEN_INF,
repeatSegment: 0 }, // TONE_DTMF_S
- { segments: { { duration: ToneGenerator::TONEGEN_INF, waveFreq: { 1477, 941, 0 } },
- { duration: 0 , waveFreq: { 0 }}},
+ { segments: { { duration: ToneGenerator::TONEGEN_INF, waveFreq: { 1477, 941, 0 }, 0, 0 },
+ { duration: 0 , waveFreq: { 0 }, 0, 0}},
repeatCnt: ToneGenerator::TONEGEN_INF,
repeatSegment: 0 }, // TONE_DTMF_P
- { segments: { { duration: ToneGenerator::TONEGEN_INF, waveFreq: { 1633, 697, 0 } },
- { duration: 0 , waveFreq: { 0 }}},
+ { segments: { { duration: ToneGenerator::TONEGEN_INF, waveFreq: { 1633, 697, 0 }, 0, 0 },
+ { duration: 0 , waveFreq: { 0 }, 0, 0}},
repeatCnt: ToneGenerator::TONEGEN_INF,
repeatSegment: 0 }, // TONE_DTMF_A
- { segments: { { duration: ToneGenerator::TONEGEN_INF, waveFreq: { 1633, 770, 0 } },
- { duration: 0 , waveFreq: { 0 }}},
+ { segments: { { duration: ToneGenerator::TONEGEN_INF, waveFreq: { 1633, 770, 0 }, 0, 0 },
+ { duration: 0 , waveFreq: { 0 }, 0, 0}},
repeatCnt: ToneGenerator::TONEGEN_INF,
repeatSegment: 0 }, // TONE_DTMF_B
- { segments: { { duration: ToneGenerator::TONEGEN_INF, waveFreq: { 1633, 852, 0 } },
- { duration: 0 , waveFreq: { 0 }}},
+ { segments: { { duration: ToneGenerator::TONEGEN_INF, waveFreq: { 1633, 852, 0 }, 0, 0 },
+ { duration: 0 , waveFreq: { 0 }, 0, 0}},
repeatCnt: ToneGenerator::TONEGEN_INF,
repeatSegment: 0 }, // TONE_DTMF_C
- { segments: { { duration: ToneGenerator::TONEGEN_INF, waveFreq: { 1633, 941, 0 } },
- { duration: 0 , waveFreq: { 0 }}},
+ { segments: { { duration: ToneGenerator::TONEGEN_INF, waveFreq: { 1633, 941, 0 }, 0, 0 },
+ { duration: 0 , waveFreq: { 0 }, 0, 0}},
repeatCnt: ToneGenerator::TONEGEN_INF,
repeatSegment: 0 }, // TONE_DTMF_D
- { segments: { { duration: ToneGenerator::TONEGEN_INF, waveFreq: { 425, 0 } },
- { duration: 0 , waveFreq: { 0 }}},
+ { segments: { { duration: ToneGenerator::TONEGEN_INF, waveFreq: { 425, 0 }, 0, 0 },
+ { duration: 0 , waveFreq: { 0 }, 0, 0}},
repeatCnt: ToneGenerator::TONEGEN_INF,
repeatSegment: 0 }, // TONE_SUP_DIAL
- { segments: { { duration: 500 , waveFreq: { 425, 0 }},
- { duration: 500, waveFreq: { 0 }},
- { duration: 0 , waveFreq: { 0 }}},
+ { segments: { { duration: 500 , waveFreq: { 425, 0 }, 0, 0},
+ { duration: 500, waveFreq: { 0 }, 0, 0},
+ { duration: 0 , waveFreq: { 0 }, 0, 0}},
repeatCnt: ToneGenerator::TONEGEN_INF,
repeatSegment: 0 }, // TONE_SUP_BUSY
- { segments: { { duration: 200, waveFreq: { 425, 0 } },
- { duration: 200, waveFreq: { 0 } },
- { duration: 0 , waveFreq: { 0 }}},
+ { segments: { { duration: 200, waveFreq: { 425, 0 }, 0, 0 },
+ { duration: 200, waveFreq: { 0 }, 0, 0 },
+ { duration: 0 , waveFreq: { 0 }, 0, 0}},
repeatCnt: ToneGenerator::TONEGEN_INF,
repeatSegment: 0 }, // TONE_SUP_CONGESTION
- { segments: { { duration: 200, waveFreq: { 425, 0 } },
- { duration: 0 , waveFreq: { 0 }}},
+ { segments: { { duration: 200, waveFreq: { 425, 0 }, 0, 0 },
+ { duration: 0 , waveFreq: { 0 }, 0, 0}},
repeatCnt: 0,
repeatSegment: 0 }, // TONE_SUP_RADIO_ACK
- { segments: { { duration: 200, waveFreq: { 425, 0 }},
- { duration: 200, waveFreq: { 0 }},
- { duration: 0 , waveFreq: { 0 }}},
+ { segments: { { duration: 200, waveFreq: { 425, 0 }, 0, 0},
+ { duration: 200, waveFreq: { 0 }, 0, 0},
+ { duration: 0 , waveFreq: { 0 }, 0, 0}},
repeatCnt: 2,
repeatSegment: 0 }, // TONE_SUP_RADIO_NOTAVAIL
- { segments: { { duration: 330, waveFreq: { 950, 1400, 1800, 0 }},
- { duration: 1000, waveFreq: { 0 } },
- { duration: 0 , waveFreq: { 0 }}},
+ { segments: { { duration: 330, waveFreq: { 950, 1400, 1800, 0 }, 0, 0},
+ { duration: 1000, waveFreq: { 0 }, 0, 0},
+ { duration: 0 , waveFreq: { 0 }, 0, 0}},
repeatCnt: ToneGenerator::TONEGEN_INF,
repeatSegment: 0 }, // TONE_SUP_ERROR
- { segments: { { duration: 200, waveFreq: { 425, 0 } },
- { duration: 600, waveFreq: { 0 } },
- { duration: 200, waveFreq: { 425, 0 } },
- { duration: 3000, waveFreq: { 0 } },
- { duration: 0 , waveFreq: { 0 }}},
+ { segments: { { duration: 200, waveFreq: { 425, 0 }, 0, 0 },
+ { duration: 600, waveFreq: { 0 }, 0, 0 },
+ { duration: 200, waveFreq: { 425, 0 }, 0, 0 },
+ { duration: 3000, waveFreq: { 0 }, 0, 0 },
+ { duration: 0 , waveFreq: { 0 }, 0, 0}},
repeatCnt: ToneGenerator::TONEGEN_INF,
repeatSegment: 0 }, // TONE_SUP_CALL_WAITING
- { segments: { { duration: 1000, waveFreq: { 425, 0 } },
- { duration: 4000, waveFreq: { 0 } },
- { duration: 0 , waveFreq: { 0 }}},
+ { segments: { { duration: 1000, waveFreq: { 425, 0 }, 0, 0 },
+ { duration: 4000, waveFreq: { 0 }, 0, 0 },
+ { duration: 0 , waveFreq: { 0 }, 0, 0}},
repeatCnt: ToneGenerator::TONEGEN_INF,
repeatSegment: 0 }, // TONE_SUP_RINGTONE
- { segments: { { duration: 40, waveFreq: { 400, 1200, 0 } },
- { duration: 0 , waveFreq: { 0 }}},
+ { segments: { { duration: 40, waveFreq: { 400, 1200, 0 }, 0, 0 },
+ { duration: 0 , waveFreq: { 0 }, 0, 0}},
repeatCnt: 0,
repeatSegment: 0 }, // TONE_PROP_BEEP
- { segments: { { duration: 100, waveFreq: { 1200, 0 } },
- { duration: 100, waveFreq: { 0 } },
- { duration: 0 , waveFreq: { 0 }}},
+ { segments: { { duration: 100, waveFreq: { 1200, 0 }, 0, 0 },
+ { duration: 100, waveFreq: { 0 }, 0, 0 },
+ { duration: 0 , waveFreq: { 0 }, 0, 0}},
repeatCnt: 1,
repeatSegment: 0 }, // TONE_PROP_ACK
- { segments: { { duration: 400, waveFreq: { 300, 400, 500, 0 } },
- { duration: 0 , waveFreq: { 0 }}},
+ { segments: { { duration: 400, waveFreq: { 300, 400, 500, 0 }, 0, 0 },
+ { duration: 0 , waveFreq: { 0 }, 0, 0}},
repeatCnt: 0,
repeatSegment: 0 }, // TONE_PROP_NACK
- { segments: { { duration: 200, waveFreq: { 400, 1200, 0 } },
- { duration: 0 , waveFreq: { 0 }}},
+ { segments: { { duration: 200, waveFreq: { 400, 1200, 0 }, 0, 0 },
+ { duration: 0 , waveFreq: { 0 }, 0, 0}},
repeatCnt: 0,
repeatSegment: 0 }, // TONE_PROP_PROMPT
- { segments: { { duration: 40, waveFreq: { 400, 1200, 0 } },
- { duration: 200, waveFreq: { 0 } },
- { duration: 40, waveFreq: { 400, 1200, 0 } },
- { duration: 0 , waveFreq: { 0 }}},
+ { segments: { { duration: 40, waveFreq: { 400, 1200, 0 }, 0, 0 },
+ { duration: 200, waveFreq: { 0 }, 0, 0 },
+ { duration: 40, waveFreq: { 400, 1200, 0 }, 0, 0 },
+ { duration: 0 , waveFreq: { 0 }, 0, 0}},
repeatCnt: 0,
repeatSegment: 0 }, // TONE_PROP_BEEP2
- { segments: { { duration: 250, waveFreq: { 440, 0 } },
- { duration: 250, waveFreq: { 620, 0 } },
- { duration: 0 , waveFreq: { 0 }}},
+ { segments: { { duration: 250, waveFreq: { 440, 0 }, 0, 0 },
+ { duration: 250, waveFreq: { 620, 0 }, 0, 0 },
+ { duration: 0 , waveFreq: { 0 }, 0, 0 }},
repeatCnt: ToneGenerator::TONEGEN_INF,
repeatSegment: 0 }, // TONE_SUP_INTERCEPT
- { segments: { { duration: 250, waveFreq: { 440, 0 } },
- { duration: 250, waveFreq: { 620, 0 } },
- { duration: 0 , waveFreq: { 0 }}},
+ { segments: { { duration: 250, waveFreq: { 440, 0 }, 0, 0 },
+ { duration: 250, waveFreq: { 620, 0 }, 0, 0 },
+ { duration: 0 , waveFreq: { 0 }, 0, 0}},
repeatCnt: 7,
repeatSegment: 0 }, // TONE_SUP_INTERCEPT_ABBREV
- { segments: { { duration: 250, waveFreq: { 480, 620, 0 } },
- { duration: 250, waveFreq: { 0 } },
- { duration: 0 , waveFreq: { 0 }}},
+ { segments: { { duration: 250, waveFreq: { 480, 620, 0 }, 0, 0 },
+ { duration: 250, waveFreq: { 0 }, 0, 0 },
+ { duration: 0 , waveFreq: { 0 }, 0, 0}},
repeatCnt: 7,
repeatSegment: 0 }, // TONE_SUP_CONGESTION_ABBREV
- { segments: { { duration: 100, waveFreq: { 350, 440, 0 } },
- { duration: 100, waveFreq: { 0 } },
- { duration: 0 , waveFreq: { 0 }}},
+ { segments: { { duration: 100, waveFreq: { 350, 440, 0 }, 0, 0 },
+ { duration: 100, waveFreq: { 0 }, 0, 0 },
+ { duration: 0 , waveFreq: { 0 }, 0, 0}},
repeatCnt: 2,
repeatSegment: 0 }, // TONE_SUP_CONFIRM
- { segments: { { duration: 100, waveFreq: { 480, 0 } },
- { duration: 100, waveFreq: { 0 } },
- { duration: 0 , waveFreq: { 0 }}},
+ { segments: { { duration: 100, waveFreq: { 480, 0 }, 0, 0 },
+ { duration: 100, waveFreq: { 0 }, 0, 0 },
+ { duration: 0 , waveFreq: { 0 }, 0, 0}},
repeatCnt: 3,
repeatSegment: 0 }, // TONE_SUP_PIP
- { segments: { { duration: ToneGenerator::TONEGEN_INF, waveFreq: { 350, 440, 0 } },
- { duration: 0 , waveFreq: { 0 }}},
+ { segments: {{ duration: ToneGenerator::TONEGEN_INF, waveFreq: { 425, 0 }, 0, 0},
+ { duration: 0 , waveFreq: { 0 }, 0, 0}},
+ repeatCnt: ToneGenerator::TONEGEN_INF,
+ repeatSegment: 0 }, // TONE_CDMA_DIAL_TONE_LITE
+ { segments: { { duration: 2000, waveFreq: { 440, 480, 0 }, 0, 0 },
+ { duration: 4000, waveFreq: { 0 }, 0, 0 },
+ { duration: 0 , waveFreq: { 0 }, 0, 0}},
+ repeatCnt: ToneGenerator::TONEGEN_INF,
+ repeatSegment: 0 }, // TONE_CDMA_NETWORK_USA_RINGBACK
+ { segments: { { duration: 250, waveFreq: { 440, 0 }, 0, 0 },
+ { duration: 250, waveFreq: { 620, 0 }, 0, 0 },
+ { duration: 0 , waveFreq: { 0 }, 0, 0}},
+ repeatCnt: ToneGenerator::TONEGEN_INF,
+ repeatSegment: 0 }, // TONE_CDMA_INTERCEPT
+ { segments: { { duration: 250, waveFreq: { 440, 0 }, 0, 0 },
+ { duration: 250, waveFreq: { 620, 0 }, 0, 0 },
+ { duration: 0 , waveFreq: { 0 }, 0, 0}},
+ repeatCnt: 0,
+ repeatSegment: 0 }, // TONE_CDMA_ABBR_INTERCEPT
+ { segments: { { duration: 250, waveFreq: { 480, 620, 0 }, 0, 0 },
+ { duration: 250, waveFreq: { 0 }, 0, 0 },
+ { duration: 0 , waveFreq: { 0 }, 0, 0}},
+ repeatCnt: ToneGenerator::TONEGEN_INF,
+ repeatSegment: 0 }, // TONE_CDMA_REORDER
+ { segments: { { duration: 250, waveFreq: { 480, 620, 0 }, 0, 0 },
+ { duration: 250, waveFreq: { 0 }, 0, 0 },
+ { duration: 0 , waveFreq: { 0 }, 0, 0}},
+ repeatCnt: 7,
+ repeatSegment: 0 }, // TONE_CDMA_ABBR_REORDER
+ { segments: { { duration: 500, waveFreq: { 480, 620, 0 }, 0, 0 },
+ { duration: 500, waveFreq: { 0 }, 0, 0 },
+ { duration: 0 , waveFreq: { 0 }, 0, 0}},
+ repeatCnt: ToneGenerator::TONEGEN_INF,
+ repeatSegment: 0 }, // TONE_CDMA_NETWORK_BUSY
+ { segments: { { duration: 100, waveFreq: { 350, 440, 0 }, 0, 0 },
+ { duration: 100, waveFreq: { 0 }, 0, 0 },
+ { duration: 0 , waveFreq: { 0 }, 0, 0}},
+ repeatCnt: 2,
+ repeatSegment: 0 }, // TONE_CDMA_CONFIRM
+ { segments: { { duration: 0, waveFreq: { 0 }, 0, 0 }},
+ repeatCnt: 0,
+ repeatSegment: 0 }, // TONE_CDMA_ANSWER
+ { segments: { { duration: 300, waveFreq: { 440, 0 }, 0, 0 },
+ { duration: 0 , waveFreq: { 0 }, 0, 0}},
+ repeatCnt: 0,
+ repeatSegment: 0 }, // TONE_CDMA_NETWORK_CALLWAITING
+ { segments: { { duration: 100, waveFreq: { 480, 0 }, 0, 0 },
+ { duration: 100, waveFreq: { 0 }, 0, 0 },
+ { duration: 0 , waveFreq: { 0 }, 0, 0}},
+ repeatCnt: 3,
+ repeatSegment: 0 }, // TONE_CDMA_PIP
+
+ { segments: { { duration: 32, waveFreq: { 2091, 0}, 0, 0 },
+ { duration: 64, waveFreq: { 2556, 0}, 19, 0},
+ { duration: 32, waveFreq: { 2091, 0}, 0, 0},
+ { duration: 48, waveFreq: { 2556, 0}, 0, 0},
+ { duration: 4000, waveFreq: { 0 }, 0, 0},
+ { duration: 0, waveFreq: { 0 }, 0, 0}},
+ repeatCnt: 0,
+ repeatSegment: 0 }, // TONE_CDMA_CALL_SIGNAL_ISDN_NORMAL
+ { segments: { { duration: 32, waveFreq: { 2091, 0}, 0, 0 },
+ { duration: 64, waveFreq: { 2556, 0}, 7, 0 },
+ { duration: 32, waveFreq: { 2091, 0}, 0, 0 },
+ { duration: 400, waveFreq: { 0 }, 0, 0 },
+ { duration: 32, waveFreq: { 2091, 0}, 0, 0 },
+ { duration: 64, waveFreq: { 2556, 0}, 7, 4 },
+ { duration: 32, waveFreq: { 2091, 0}, 0, 0 },
+ { duration: 4000, waveFreq: { 0 }, 0, 0 },
+ { duration: 0, waveFreq: { 0 }, 0, 0 } },
+ repeatCnt: 0,
+ repeatSegment: 0 }, // TONE_CDMA_CALL_SIGNAL_ISDN_INTERGROUP
+ { segments: { { duration: 32, waveFreq: { 2091, 0}, 0, 0 },
+ { duration: 64, waveFreq: { 2556, 0}, 3, 0 },
+ { duration: 16, waveFreq: { 2091, 0}, 0, 0 },
+ { duration: 200, waveFreq: { 0 }, 0, 0 },
+ { duration: 32, waveFreq: { 2091, 0}, 0, 0 },
+ { duration: 64, waveFreq: { 2556, 0}, 3, 4 },
+ { duration: 16, waveFreq: { 2091, 0}, 0, 0 },
+ { duration: 200, waveFreq: { 0 }, 0, 0 },
+ { duration: 0, waveFreq: { 0 }, 0, 0 } },
+ repeatCnt: 0,
+ repeatSegment: 0 }, // TONE_CDMA_CALL_SIGNAL_ISDN_SP_PRI
+ { segments: { { duration: 0, waveFreq: { 0 }, 0, 0} },
+ repeatCnt: 0,
+ repeatSegment: 0 }, // TONE_CDMA_CALL_SIGNAL_ISDN_PAT3
+ { segments: { { duration: 32, waveFreq: { 2091, 0 }, 0, 0 },
+ { duration: 64, waveFreq: { 2556, 0 }, 4, 0 },
+ { duration: 20, waveFreq: { 2091, 0 }, 0, 0 },
+ { duration: 0, waveFreq: { 0 } , 0, 0 } },
+ repeatCnt: 0,
+ repeatSegment: 0 }, // TONE_CDMA_CALL_SIGNAL_ISDN_PING_RING
+ { segments: { { duration: 0, waveFreq: { 0 }, 0, 0} },
+ repeatCnt: 0,
+ repeatSegment: 0 }, // TONE_CDMA_CALL_SIGNAL_ISDN_PAT5
+ { segments: { { duration: 0, waveFreq: { 0 }, 0, 0} },
+ repeatCnt: 0,
+ repeatSegment: 0 }, // TONE_CDMA_CALL_SIGNAL_ISDN_PAT6
+ { segments: { { duration: 0, waveFreq: { 0 }, 0, 0} },
+ repeatCnt: 0,
+ repeatSegment: 0 }, // TONE_CDMA_CALL_SIGNAL_ISDN_PAT7
+
+ { segments: { { duration: 25, waveFreq: { 3700, 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 4000, 0 }, 39, 0 },
+ { duration: 4000, waveFreq: { 0 }, 0, 0 },
+ { duration: 0, waveFreq: { 0 }, 0, 0 } },
+ repeatCnt: ToneGenerator::TONEGEN_INF,
+ repeatSegment: 0 }, // TONE_CDMA_HIGH_L
+ { segments: { { duration: 25, waveFreq: { 2600, 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 2900, 0 }, 39, 0 },
+ { duration: 4000, waveFreq: { 0 }, 0, 0 },
+ { duration: 0, waveFreq: { 0 }, 0, 0 } },
+ repeatCnt: ToneGenerator::TONEGEN_INF,
+ repeatSegment: 0 }, // TONE_CDMA_MED_L
+ { segments: { { duration: 25, waveFreq: { 1300, 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 1450, 0 }, 39, 0 },
+ { duration: 4000, waveFreq: { 0 }, 0, 0 },
+ { duration: 0, waveFreq: { 0 }, 0, 0 } },
+ repeatCnt: ToneGenerator::TONEGEN_INF,
+ repeatSegment: 0 }, // TONE_CDMA_LOW_L
+ { segments: { { duration: 25, waveFreq: { 3700, 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 4000, 0 }, 15, 0 },
+ { duration: 400, waveFreq: { 0 }, 0, 0 },
+ { duration: 0, waveFreq: { 0 }, 0, 0 } },
+ repeatCnt: ToneGenerator::TONEGEN_INF,
+ repeatSegment: 0 }, // TONE_CDMA_HIGH_SS
+ { segments: { { duration: 25, waveFreq: { 2600, 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 2900, 0 }, 15, 0 },
+ { duration: 400, waveFreq: { 0 }, 0, 0 },
+ { duration: 0, waveFreq: { 0 }, 0, 0 }},
+ repeatCnt: ToneGenerator::TONEGEN_INF,
+ repeatSegment: 0 }, // TONE_CDMA_MED_SS
+ { segments: { { duration: 25, waveFreq: { 1300, 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 1450, 0 }, 15, 0 },
+ { duration: 400, waveFreq: { 0 }, 0, 0 },
+ { duration: 0, waveFreq: { 0 }, 0, 0 }},
+ repeatCnt: ToneGenerator::TONEGEN_INF,
+ repeatSegment: 0 }, // TONE_CDMA_LOW_SS
+ { segments: { { duration: 25, waveFreq: { 3700, 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 4000, 0 }, 7, 0 },
+ { duration: 200, waveFreq: { 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 3700, 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 4000, 0 }, 7, 3 },
+ { duration: 200, waveFreq: { 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 3700, 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 4000, 0 }, 15, 6 },
+ { duration: 4000, waveFreq: { 0 }, 0, 0 },
+ { duration: 0, waveFreq: { 0 }, 0, 0 }},
+ repeatCnt: ToneGenerator::TONEGEN_INF,
+ repeatSegment: 0 }, // TONE_CDMA_HIGH_SSL
+ { segments: { { duration: 25, waveFreq: { 2600, 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 2900, 0 }, 7, 0 },
+ { duration: 200, waveFreq: { 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 2600, 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 2900, 0 }, 7, 3 },
+ { duration: 200, waveFreq: { 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 2600, 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 2900, 0 }, 15, 6 },
+ { duration: 4000, waveFreq: { 0 }, 0, 0 },
+ { duration: 0, waveFreq: { 0 }, 0, 0 }},
+ repeatCnt: ToneGenerator::TONEGEN_INF,
+ repeatSegment: 0 }, // TONE_CDMA_MED_SSL
+ { segments: { { duration: 25, waveFreq: { 1300, 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 1450, 0 }, 7, 0 },
+ { duration: 200, waveFreq: { 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 1300, 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 1450, 0 }, 7, 3 },
+ { duration: 200, waveFreq: { 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 1300, 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 1450, 0 }, 15, 6 },
+ { duration: 4000, waveFreq: { 0 }, 0, 0 },
+ { duration: 0, waveFreq: { 0 }, 0, 0 }},
+ repeatCnt: ToneGenerator::TONEGEN_INF,
+ repeatSegment: 0 }, // TONE_CDMA_LOW_SSL
+ { segments: { { duration: 25, waveFreq: { 3700, 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 4000, 0 }, 19, 0 },
+ { duration: 1000, waveFreq: { 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 3700, 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 4000, 0 }, 19, 3 },
+ { duration: 3000, waveFreq: { 0 }, 0, 0 },
+ { duration: 0, waveFreq: { 0 }, 0, 0 }},
+ repeatCnt: ToneGenerator::TONEGEN_INF,
+ repeatSegment: 0 }, // TONE_CDMA_HIGH_SS_2
+ { segments: { { duration: 25, waveFreq: { 2600, 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 2900, 0 }, 19, 0 },
+ { duration: 1000, waveFreq: { 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 2600, 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 2900, 0 }, 19, 3 },
+ { duration: 3000, waveFreq: { 0 }, 0, 0 },
+ { duration: 0, waveFreq: { 0 }, 0, 0 }},
+ repeatCnt: ToneGenerator::TONEGEN_INF,
+ repeatSegment: 0 }, // TONE_CDMA_MED_SS_2
+ { segments: { { duration: 25, waveFreq: { 1300, 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 1450, 0 }, 19, 0 },
+ { duration: 1000, waveFreq: { 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 1300, 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 1450, 0 }, 19, 3 },
+ { duration: 3000, waveFreq: { 0 }, 0, 0 },
+ { duration: 0, waveFreq: { 0 }, 0, 0 }},
+ repeatCnt: ToneGenerator::TONEGEN_INF,
+ repeatSegment: 0 }, // TONE_CDMA_LOW_SS_2
+ { segments: { { duration: 25, waveFreq: { 3700, 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 4000, 0 }, 9, 0 },
+ { duration: 500, waveFreq: { 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 3700, 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 4000, 0 }, 19, 3 },
+ { duration: 500, waveFreq: { 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 3700, 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 4000, 0 }, 9, 6 },
+ { duration: 3000, waveFreq: { 0 }, 0, 0 },
+ { duration: 0, waveFreq: { 0 }, 0, 0 }},
+ repeatCnt: ToneGenerator::TONEGEN_INF,
+ repeatSegment: 0 }, // TONE_CDMA_HIGH_SLS
+ { segments: { { duration: 25, waveFreq: { 2600, 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 2900, 0 }, 9, 0 },
+ { duration: 500, waveFreq: { 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 2600, 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 2900, 0 }, 19, 3 },
+ { duration: 500, waveFreq: { 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 2600, 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 2900, 0 }, 9, 6 },
+ { duration: 3000, waveFreq: { 0 }, 0, 0 },
+ { duration: 0, waveFreq: { 0 }, 0, 0 }},
+ repeatCnt: ToneGenerator::TONEGEN_INF,
+ repeatSegment: 0 }, // TONE_CDMA_MED_SLS
+ { segments: { { duration: 25, waveFreq: { 1300, 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 1450, 0 }, 9, 0 },
+ { duration: 500, waveFreq: { 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 1300, 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 1450, 0 }, 19, 3 },
+ { duration: 500, waveFreq: { 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 1300, 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 1450, 0 }, 9, 6 },
+ { duration: 3000, waveFreq: { 0 }, 0, 0 },
+ { duration: 0, waveFreq: { 0 }, 0, 0 }},
+ repeatCnt: ToneGenerator::TONEGEN_INF,
+ repeatSegment: 0 }, // TONE_CDMA_LOW_SLS
+ { segments: { { duration: 25, waveFreq: { 3700, 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 4000, 0 }, 9, 0 },
+ { duration: 500, waveFreq: { 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 3700, 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 4000, 0 }, 9, 3 },
+ { duration: 500, waveFreq: { 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 3700, 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 4000, 0 }, 9, 6 },
+ { duration: 500, waveFreq: { 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 3700, 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 4000, 0 }, 9, 9 },
+ { duration: 2500, waveFreq: { 0 }, 0, 0 },
+ { duration: 0, waveFreq: { 0 }, 0, 0 }},
+ repeatCnt: ToneGenerator::TONEGEN_INF,
+ repeatSegment: 0 }, // TONE_CDMA_HIGH_S_X4
+ { segments: { { duration: 25, waveFreq: { 2600, 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 2900, 0 }, 9, 0 },
+ { duration: 500, waveFreq: { 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 2600, 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 2900, 0 }, 9, 3 },
+ { duration: 500, waveFreq: { 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 2600, 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 2900, 0 }, 9, 6 },
+ { duration: 500, waveFreq: { 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 2600, 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 2900, 0 }, 9, 9 },
+ { duration: 2500, waveFreq: { 0 }, 0, 0 },
+ { duration: 0, waveFreq: { 0 }, 0, 0 }},
+ repeatCnt: ToneGenerator::TONEGEN_INF,
+ repeatSegment: 0 }, // TONE_CDMA_MED_S_X4
+ { segments: { { duration: 25, waveFreq: { 1300, 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 1450, 0 }, 9, 0 },
+ { duration: 500, waveFreq: { 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 1300, 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 1450, 0 }, 9, 3 },
+ { duration: 500, waveFreq: { 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 1300, 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 1450, 0 }, 9, 6 },
+ { duration: 500, waveFreq: { 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 1300, 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 1450, 0 }, 9, 9 },
+ { duration: 2500, waveFreq: { 0 }, 0, 0 },
+ { duration: 0, waveFreq: { 0 }, 0, 0 }},
+ repeatCnt: ToneGenerator::TONEGEN_INF,
+ repeatSegment: 0 }, // TONE_CDMA_LOW_S_X4
+ { segments: { { duration: 25, waveFreq: { 3700, 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 4000, 0 }, 19, 0 },
+ { duration: 2000, waveFreq: { 0 }, 0, 0 },
+ { duration: 0, waveFreq: { 0 }, 0, 0 }},
+ repeatCnt: ToneGenerator::TONEGEN_INF,
+ repeatSegment: 0 }, // TONE_CDMA_HIGH_PBX_L
+ { segments: { { duration: 25, waveFreq: { 2600, 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 2900, 0 }, 19, 0 },
+ { duration: 2000, waveFreq: { 0 }, 0, 0 },
+ { duration: 0, waveFreq: { 0 }, 0, 0 }},
+ repeatCnt: ToneGenerator::TONEGEN_INF,
+ repeatSegment: 0 }, // TONE_CDMA_MED_PBX_L
+ { segments: { { duration: 25, waveFreq: { 1300, 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 1450, 0 }, 19, 0 },
+ { duration: 2000, waveFreq: { 0 }, 0, 0 },
+ { duration: 0, waveFreq: { 0 }, 0, 0 }},
+ repeatCnt: ToneGenerator::TONEGEN_INF,
+ repeatSegment: 0 }, // TONE_CDMA_LOW_PBX_L
+ { segments: { { duration: 25, waveFreq: { 3700, 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 4000, 0 }, 7, 0 },
+ { duration: 200, waveFreq: { 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 3700, 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 4000, 0 }, 7, 3 },
+ { duration: 2000, waveFreq: { 0 }, 0, 0 },
+ { duration: 0, waveFreq: { 0 }, 0, 0 }},
+ repeatCnt: ToneGenerator::TONEGEN_INF,
+ repeatSegment: 0 }, // TONE_CDMA_HIGH_PBX_SS
+ { segments: { { duration: 25, waveFreq: { 2600, 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 2900, 0 }, 7, 0 },
+ { duration: 200, waveFreq: { 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 2600, 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 2900, 0 }, 7, 3 },
+ { duration: 2000, waveFreq: { 0 }, 0, 0 },
+ { duration: 0, waveFreq: { 0 }, 0, 0 }},
+ repeatCnt: ToneGenerator::TONEGEN_INF,
+ repeatSegment: 0 }, // TONE_CDMA_MED_PBX_SS
+ { segments: { { duration: 25, waveFreq: { 1300, 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 1450, 0 }, 7, 0 },
+ { duration: 200, waveFreq: { 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 1300, 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 1450, 0 }, 7, 3 },
+ { duration: 2000, waveFreq: { 0 }, 0, 0 },
+ { duration: 0, waveFreq: { 0 }, 0, 0 }},
+ repeatCnt: ToneGenerator::TONEGEN_INF,
+ repeatSegment: 0 }, // TONE_CDMA_LOW_PBX_SS
+ { segments: { { duration: 25, waveFreq: { 3700, 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 4000, 0 }, 7, 0 },
+ { duration: 200, waveFreq: { 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 3700, 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 4000, 0 }, 7, 3 },
+ { duration: 200, waveFreq: { 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 3700, 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 4000, 0 }, 15, 6 },
+ { duration: 1000, waveFreq: { 0 }, 0, 0 },
+ { duration: 0, waveFreq: { 0 }, 0, 0 }},
+ repeatCnt: ToneGenerator::TONEGEN_INF,
+ repeatSegment: 0 }, // TONE_CDMA_HIGH_PBX_SSL
+ { segments: { { duration: 25, waveFreq: { 2600, 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 2900, 0 }, 7, 0 },
+ { duration: 200, waveFreq: { 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 2600, 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 2900, 0 }, 7, 3 },
+ { duration: 200, waveFreq: { 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 2600, 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 2900, 0 }, 15, 6 },
+ { duration: 1000, waveFreq: { 0 }, 0, 0 },
+ { duration: 0, waveFreq: { 0 }, 0, 0 }},
+ repeatCnt: ToneGenerator::TONEGEN_INF,
+ repeatSegment: 0 }, // TONE_CDMA_MED_PBX_SSL
+ { segments: { { duration: 25, waveFreq: { 1300, 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 1450, 0 }, 7, 0 },
+ { duration: 200, waveFreq: { 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 1300, 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 1450, 0 }, 7, 3 },
+ { duration: 200, waveFreq: { 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 1300, 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 1450, 0 }, 15, 6 },
+ { duration: 1000, waveFreq: { 0 }, 0, 0 },
+ { duration: 0, waveFreq: { 0 }, 0, 0 }},
+ repeatCnt: ToneGenerator::TONEGEN_INF,
+ repeatSegment: 0 }, // TONE_CDMA_LOW_PBX_SSL
+ { segments: { { duration: 25, waveFreq: { 3700, 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 4000, 0 }, 7, 0 },
+ { duration: 200, waveFreq: { 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 3700, 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 4000, 0 }, 15, 3 },
+ { duration: 200, waveFreq: { 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 3700, 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 4000, 0 }, 7, 6 },
+ { duration: 1000, waveFreq: { 0 }, 0, 0 },
+ { duration: 0, waveFreq: { 0 }, 0, 0 }},
+ repeatCnt: ToneGenerator::TONEGEN_INF,
+ repeatSegment: 0 }, // TONE_CDMA_HIGH_PBX_SLS
+ { segments: { { duration: 25, waveFreq: { 2600, 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 2900, 0 }, 7, 0 },
+ { duration: 200, waveFreq: { 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 2600, 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 2900, 0 }, 15, 3 },
+ { duration: 200, waveFreq: { 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 2600, 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 2900, 0 }, 7, 6 },
+ { duration: 1000, waveFreq: { 0 }, 0, 0 },
+ { duration: 0, waveFreq: { 0 }, 0, 0 }},
+ repeatCnt: ToneGenerator::TONEGEN_INF,
+ repeatSegment: 0 }, // TONE_CDMA_MED_PBX_SLS
+ { segments: { { duration: 25, waveFreq: { 1300, 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 1450, 0 }, 7, 0 },
+ { duration: 200, waveFreq: { 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 1300, 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 1450, 0 }, 15, 3 },
+ { duration: 200, waveFreq: { 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 1300, 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 1450, 0 }, 7, 6 },
+ { duration: 1000, waveFreq: { 0 }, 0, 0 },
+ { duration: 0, waveFreq: { 0 }, 0, 0 }},
+ repeatCnt: ToneGenerator::TONEGEN_INF,
+ repeatSegment: 0 }, // TONE_CDMA_LOW_PBX_SLS
+ { segments: { { duration: 25, waveFreq: { 3700, 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 4000, 0 }, 7, 0 },
+ { duration: 200, waveFreq: { 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 3700, 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 4000, 0 }, 7, 3 },
+ { duration: 200, waveFreq: { 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 3700, 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 4000, 0 }, 7, 6 },
+ { duration: 200, waveFreq: { 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 3700, 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 4000, 0 }, 7, 9 },
+ { duration: 800, waveFreq: { 0 }, 0, 0 },
+ { duration: 0, waveFreq: { 0 }, 0, 0 }},
+ repeatCnt: ToneGenerator::TONEGEN_INF,
+ repeatSegment: 0 }, // TONE_CDMA_HIGH_PBX_S_X4
+ { segments: { { duration: 25, waveFreq: { 2600, 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 2900, 0 }, 7, 0 },
+ { duration: 200, waveFreq: { 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 2600, 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 2900, 0 }, 7, 3 },
+ { duration: 200, waveFreq: { 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 2600, 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 2900, 0 }, 7, 6 },
+ { duration: 200, waveFreq: { 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 2600, 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 2900, 0 }, 7, 9 },
+ { duration: 800, waveFreq: { 0 }, 0, 0 },
+ { duration: 0, waveFreq: { 0 }, 0, 0 }},
+ repeatCnt: ToneGenerator::TONEGEN_INF,
+ repeatSegment: 0 }, // TONE_CDMA_MED_PBX_S_X4
+ { segments: { { duration: 25, waveFreq: { 1300, 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 1450, 0 }, 7, 0 },
+ { duration: 200, waveFreq: { 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 1300, 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 1450, 0 }, 7, 3 },
+ { duration: 200, waveFreq: { 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 1300, 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 1450, 0 }, 7, 6 },
+ { duration: 200, waveFreq: { 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 1300, 0 }, 0, 0 },
+ { duration: 25, waveFreq: { 1450, 0 }, 7, 9 },
+ { duration: 800, waveFreq: { 0 }, 0, 0 },
+ { duration: 0, waveFreq: { 0 }, 0, 0 }},
+ repeatCnt: ToneGenerator::TONEGEN_INF,
+ repeatSegment: 0 }, // TONE_CDMA_LOW_PBX_S_X4
+
+ { segments: { { duration: 62, waveFreq: { 1109, 0 }, 0, 0 },
+ { duration: 62, waveFreq: { 784, 0 }, 0, 0 },
+ { duration: 62, waveFreq: { 740, 0 }, 0, 0 },
+ { duration: 62, waveFreq: { 622, 0 }, 0, 0 },
+ { duration: 62, waveFreq: { 1109, 0 }, 0, 0 },
+ { duration: 0, waveFreq: { 0 }, 0, 0 } },
+ repeatCnt: 0,
+ repeatSegment: 0 }, // TONE_CDMA_ALERT_NETWORK_LITE
+ { segments: { { duration: 62, waveFreq: { 1245, 0 }, 0, 0 },
+ { duration: 62, waveFreq: { 659, 0 }, 2, 0 },
+ { duration: 62, waveFreq: { 1245, 0 }, 0, 0 },
+ { duration: 0, waveFreq: { 0 }, 0, 0 } },
+ repeatCnt: 0,
+ repeatSegment: 0 }, // TONE_CDMA_ALERT_AUTOREDIAL_LITE
+ { segments: { { duration: 400, waveFreq: { 1150, 770, 0 }, 0, 0 },
+ { duration: 0, waveFreq: { 0 }, 0, 0 } },
+ repeatCnt: 0,
+ repeatSegment: 0 }, // TONE_CDMA_ONE_MIN_BEEP
+ { segments: { { duration: 120, waveFreq: { 941, 1477, 0 }, 0, 0 },
+ { duration: 0, waveFreq: { 0 }, 0, 0 } },
+ repeatCnt: 0,
+ repeatSegment: 0 }, // TONE_CDMA_KEYPAD_VOLUME_KEY_LITE
+ { segments: { { duration: 375, waveFreq: { 587, 0 }, 0, 0 },
+ { duration: 125, waveFreq: { 1175, 0 }, 0, 0 },
+ { duration: 0, waveFreq: { 0 }, 0, 0 } },
+ repeatCnt: 0,
+ repeatSegment: 0 }, // TONE_CDMA_PRESSHOLDKEY_LITE
+ { segments: { { duration: 62, waveFreq: { 587, 0 }, 0, 0 },
+ { duration: 62, waveFreq: { 784, 0 }, 0, 0 },
+ { duration: 62, waveFreq: { 831, 0 }, 0, 0 },
+ { duration: 62, waveFreq: { 784, 0 }, 0, 0 },
+ { duration: 62, waveFreq: { 1109, 0 }, 0, 0 },
+ { duration: 62, waveFreq: { 784, 0 }, 0, 0 },
+ { duration: 62, waveFreq: { 831, 0 }, 0, 0 },
+ { duration: 62, waveFreq: { 784, 0 }, 0, 0 },
+ { duration: 0, waveFreq: { 0 }, 0, 0 } },
+ repeatCnt: 0,
+ repeatSegment: 0 }, // TONE_CDMA_ALERT_INCALL_LITE
+ { segments: { { duration: 125, waveFreq: { 941, 0 }, 0, 0 },
+ { duration: 10, waveFreq: { 0 }, 2, 0 },
+ { duration: 4990, waveFreq: { 0 }, 0, 0 },
+ { duration: 0, waveFreq: { 0 }, 0, 0 } },
+ repeatCnt: ToneGenerator::TONEGEN_INF,
+ repeatSegment: 0 }, // TONE_CDMA_EMERGENCY_RINGBACK
+ { segments: { { duration: 125, waveFreq: { 1319, 0 }, 0, 0 },
+ { duration: 125, waveFreq: { 0 }, 0, 0 },
+ { duration: 0, waveFreq: { 0 }, 0, 0 } },
+ repeatCnt: 2,
+ repeatSegment: 0 }, // TONE_CDMA_ALERT_CALL_GUARD
+ { segments: { { duration: 125, waveFreq: { 1047, 0 }, 0, 0 },
+ { duration: 125, waveFreq: { 370, 0 }, 0, 0 },
+ { duration: 0, waveFreq: { 0 }, 0, 0 } },
+ repeatCnt: 0,
+ repeatSegment: 0 }, // TONE_CDMA_SOFT_ERROR_LITE
+ { segments: { { duration: 125, waveFreq: { 1480, 0 }, 0, 0 },
+ { duration: 125, waveFreq: { 1397, 0 }, 0, 0 },
+ { duration: 125, waveFreq: { 784, 0 }, 0, 0 },
+ { duration: 0, waveFreq: { 0 }, 0, 0 } },
+ repeatCnt: 0,
+ repeatSegment: 0 }, // TONE_CDMA_CALLDROP_LITE
+
+ { segments: { { duration: 500, waveFreq: { 425, 0 }, 0, 0 },
+ { duration: 500, waveFreq: { 0 }, 0, 0 },
+ { duration: 0, waveFreq: { 0 }, 0, 0 }},
+ repeatCnt: 0,
+ repeatSegment: 0 }, // TONE_CDMA_NETWORK_BUSY_ONE_SHOT
+ { segments: { { duration: 400, waveFreq: { 1150, 770 }, 0, 0 },
+ { duration: 0, waveFreq: { 0 }, 0, 0 }},
+ repeatCnt: 0,
+ repeatSegment: 0 }, // TONE_CDMA_ABBR_ALERT
+ { segments: { { duration: 0, waveFreq: { 0 }, 0, 0 }},
+ repeatCnt: 0,
+ repeatSegment: 0 }, // TONE_CDMA_SIGNAL_OFF
+
+ { segments: { { duration: ToneGenerator::TONEGEN_INF, waveFreq: { 350, 440, 0 }, 0, 0 },
+ { duration: 0 , waveFreq: { 0 }, 0, 0}},
repeatCnt: ToneGenerator::TONEGEN_INF,
repeatSegment: 0 }, // TONE_ANSI_DIAL
- { segments: { { duration: 500, waveFreq: { 480, 620, 0 } },
- { duration: 500, waveFreq: { 0 } },
- { duration: 0 , waveFreq: { 0 }}},
+ { segments: { { duration: 500, waveFreq: { 480, 620, 0 }, 0, 0 },
+ { duration: 500, waveFreq: { 0 }, 0, 0 },
+ { duration: 0 , waveFreq: { 0 }, 0, 0}},
repeatCnt: ToneGenerator::TONEGEN_INF,
repeatSegment: 0 }, // TONE_ANSI_BUSY
- { segments: { { duration: 250, waveFreq: { 480, 620, 0 } },
- { duration: 250, waveFreq: { 0 } },
- { duration: 0 , waveFreq: { 0 }}},
+ { segments: { { duration: 250, waveFreq: { 480, 620, 0 }, 0, 0 },
+ { duration: 250, waveFreq: { 0 }, 0, 0 },
+ { duration: 0 , waveFreq: { 0 }, 0, 0}},
repeatCnt: ToneGenerator::TONEGEN_INF,
repeatSegment: 0 }, // TONE_ANSI_CONGESTION
- { segments: { { duration: 300, waveFreq: { 440, 0 } },
- { duration: 9700, waveFreq: { 0 } },
- { duration: 100, waveFreq: { 440, 0 } },
- { duration: 100, waveFreq: { 0 } },
- { duration: 100, waveFreq: { 440, 0 } },
- { duration: 0 , waveFreq: { 0 }}},
+ { segments: { { duration: 300, waveFreq: { 440, 0 }, 0, 0 },
+ { duration: 9700, waveFreq: { 0 }, 0, 0 },
+ { duration: 100, waveFreq: { 440, 0 }, 0, 0 },
+ { duration: 100, waveFreq: { 0 }, 0, 0 },
+ { duration: 100, waveFreq: { 440, 0 }, 0, 0 },
+ { duration: 0 , waveFreq: { 0 }, 0, 0}},
repeatCnt: ToneGenerator::TONEGEN_INF,
repeatSegment: 1 }, // TONE_ANSI_CALL_WAITING
- { segments: { { duration: 2000, waveFreq: { 440, 480, 0 } },
- { duration: 4000, waveFreq: { 0 } },
- { duration: 0 , waveFreq: { 0 }}},
+ { segments: { { duration: 2000, waveFreq: { 440, 480, 0 }, 0, 0 },
+ { duration: 4000, waveFreq: { 0 }, 0, 0 },
+ { duration: 0 , waveFreq: { 0 }, 0, 0}},
repeatCnt: ToneGenerator::TONEGEN_INF,
repeatSegment: 0 }, // TONE_ANSI_RINGTONE
- { segments: { { duration: ToneGenerator::TONEGEN_INF, waveFreq: { 400, 0 } },
- { duration: 0 , waveFreq: { 0 }}},
+ { segments: { { duration: ToneGenerator::TONEGEN_INF, waveFreq: { 400, 0 }, 0, 0 },
+ { duration: 0 , waveFreq: { 0 }, 0, 0}},
repeatCnt: ToneGenerator::TONEGEN_INF,
repeatSegment: 0 }, // TONE_JAPAN_DIAL
- { segments: { { duration: 500, waveFreq: { 400, 0 } },
- { duration: 500, waveFreq: { 0 } },
- { duration: 0 , waveFreq: { 0 }}},
+ { segments: { { duration: 500, waveFreq: { 400, 0 }, 0, 0 },
+ { duration: 500, waveFreq: { 0 }, 0, 0 },
+ { duration: 0 , waveFreq: { 0 }, 0, 0}},
repeatCnt: ToneGenerator::TONEGEN_INF,
repeatSegment: 0 }, // TONE_JAPAN_BUSY
- { segments: { { duration: 1000, waveFreq: { 400, 0 } },
- { duration: 2000, waveFreq: { 0 } },
- { duration: 0 , waveFreq: { 0 }}},
+ { segments: { { duration: 1000, waveFreq: { 400, 0 }, 0, 0 },
+ { duration: 2000, waveFreq: { 0 }, 0, 0 },
+ { duration: 0 , waveFreq: { 0 }, 0, 0}},
repeatCnt: ToneGenerator::TONEGEN_INF,
repeatSegment: 0 }, // TONE_JAPAN_RADIO_ACK
+
+
+
};
// Used by ToneGenerator::getToneForRegion() to convert user specified supervisory tone type
@@ -529,9 +1050,9 @@ initAudioTrack_exit:
//
////////////////////////////////////////////////////////////////////////////////
void ToneGenerator::audioCallback(int event, void* user, void *info) {
-
+
if (event != AudioTrack::EVENT_MORE_DATA) return;
-
+
const AudioTrack::Buffer *buffer = static_cast<const AudioTrack::Buffer *>(info);
ToneGenerator *lpToneGen = static_cast<ToneGenerator *>(user);
short *lpOut = buffer->i16;
@@ -549,12 +1070,12 @@ void ToneGenerator::audioCallback(int event, void* user, void *info) {
unsigned int lGenSmp;
unsigned int lWaveCmd = WaveGenerator::WAVEGEN_CONT;
bool lSignal = false;
-
+
lpToneGen->mLock.lock();
// Update pcm frame count and end time (current time at the end of this process)
lpToneGen->mTotalSmp += lReqSmp;
-
+
// Update tone gen state machine and select wave gen command
switch (lpToneGen->mState) {
case TONE_PLAYING:
@@ -562,13 +1083,13 @@ void ToneGenerator::audioCallback(int event, void* user, void *info) {
break;
case TONE_STARTING:
LOGV("Starting Cbk");
-
+
lWaveCmd = WaveGenerator::WAVEGEN_START;
break;
case TONE_STOPPING:
case TONE_RESTARTING:
LOGV("Stop/restart Cbk");
-
+
lWaveCmd = WaveGenerator::WAVEGEN_STOP;
lpToneGen->mNextSegSmp = TONEGEN_INF; // forced to skip state machine management below
break;
@@ -578,21 +1099,21 @@ void ToneGenerator::audioCallback(int event, void* user, void *info) {
lNumSmp = 0;
goto audioCallback_EndLoop;
}
-
-
+
+
// Exit if tone sequence is over
if (lpToneDesc->segments[lpToneGen->mCurSegment].duration == 0) {
if (lpToneGen->mState == TONE_PLAYING) {
- lpToneGen->mState = TONE_STOPPING;
+ lpToneGen->mState = TONE_STOPPING;
}
goto audioCallback_EndLoop;
}
-
+
if (lpToneGen->mTotalSmp > lpToneGen->mNextSegSmp) {
// Time to go to next sequence segment
-
+
LOGV("End Segment, time: %d\n", (unsigned int)(systemTime()/1000000));
-
+
lGenSmp = lReqSmp;
// If segment, ON -> OFF transition : ramp volume down
@@ -609,25 +1130,49 @@ void ToneGenerator::audioCallback(int event, void* user, void *info) {
LOGV("ON->OFF, lGenSmp: %d, lReqSmp: %d\n", lGenSmp, lReqSmp);
}
- // Go to next segment
- lpToneGen->mCurSegment++;
+ // check if we need to loop and loop for the reqd times
+ if (lpToneDesc->segments[lpToneGen->mCurSegment].loopCnt) {
+ if (lpToneGen->mLoopCounter < lpToneDesc->segments[lpToneGen->mCurSegment].loopCnt) {
+ LOGV ("in if loop loopCnt(%d) loopctr(%d), CurSeg(%d) \n",
+ lpToneDesc->segments[lpToneGen->mCurSegment].loopCnt,
+ lpToneGen->mLoopCounter,
+ lpToneGen->mCurSegment);
+ lpToneGen->mCurSegment = lpToneDesc->segments[lpToneGen->mCurSegment].loopIndx;
+ ++lpToneGen->mLoopCounter;
+ } else {
+ // completed loop. go to next segment
+ lpToneGen->mLoopCounter = 0;
+ lpToneGen->mCurSegment++;
+ LOGV ("in else loop loopCnt(%d) loopctr(%d), CurSeg(%d) \n",
+ lpToneDesc->segments[lpToneGen->mCurSegment].loopCnt,
+ lpToneGen->mLoopCounter,
+ lpToneGen->mCurSegment);
+ }
+ } else {
+ lpToneGen->mCurSegment++;
+ LOGV ("Goto next seg loopCnt(%d) loopctr(%d), CurSeg(%d) \n",
+ lpToneDesc->segments[lpToneGen->mCurSegment].loopCnt,
+ lpToneGen->mLoopCounter,
+ lpToneGen->mCurSegment);
+
+ }
// Handle loop if last segment reached
if (lpToneDesc->segments[lpToneGen->mCurSegment].duration == 0) {
LOGV("Last Seg: %d\n", lpToneGen->mCurSegment);
-
+
// Pre increment loop count and restart if total count not reached. Stop sequence otherwise
if (++lpToneGen->mCurCount <= lpToneDesc->repeatCnt) {
LOGV("Repeating Count: %d\n", lpToneGen->mCurCount);
-
+
lpToneGen->mCurSegment = lpToneDesc->repeatSegment;
if (lpToneDesc->segments[lpToneDesc->repeatSegment].waveFreq[0] != 0) {
lWaveCmd = WaveGenerator::WAVEGEN_START;
}
-
+
LOGV("New segment %d, Next Time: %d\n", lpToneGen->mCurSegment,
(lpToneGen->mNextSegSmp*1000)/lpToneGen->mSamplingRate);
-
+
} else {
lGenSmp = 0;
LOGV("End repeat, time: %d\n", (unsigned int)(systemTime()/1000000));
@@ -644,11 +1189,11 @@ void ToneGenerator::audioCallback(int event, void* user, void *info) {
lGenSmp = 0;
}
}
-
+
// Update next segment transition position. No harm to do it also for last segment as lpToneGen->mNextSegSmp won't be used any more
lpToneGen->mNextSegSmp
+= (lpToneDesc->segments[lpToneGen->mCurSegment].duration * lpToneGen->mSamplingRate) / 1000;
-
+
} else {
// Inside a segment keep tone ON or OFF
if (lpToneDesc->segments[lpToneGen->mCurSegment].waveFreq[0] == 0) {
@@ -657,24 +1202,24 @@ void ToneGenerator::audioCallback(int event, void* user, void *info) {
lGenSmp = lReqSmp; // If event segment, tone is currently ON
}
}
-
+
if (lGenSmp) {
// If samples must be generated, call all active wave generators and acumulate waves in lpOut
unsigned int lFreqIdx = 0;
unsigned short lFrequency = lpToneDesc->segments[lpToneGen->mCurSegment].waveFreq[lFreqIdx];
-
+
while (lFrequency != 0) {
WaveGenerator *lpWaveGen = lpToneGen->mWaveGens.valueFor(lFrequency);
lpWaveGen->getSamples(lpOut, lGenSmp, lWaveCmd);
lFrequency = lpToneDesc->segments[lpToneGen->mCurSegment].waveFreq[++lFreqIdx];
}
}
-
+
lNumSmp -= lReqSmp;
lpOut += lReqSmp;
-
+
audioCallback_EndLoop:
-
+
switch (lpToneGen->mState) {
case TONE_RESTARTING:
LOGV("Cbk restarting track\n");
@@ -694,7 +1239,7 @@ audioCallback_EndLoop:
LOGV("Cbk Stopping track\n");
lSignal = true;
lpToneGen->mpAudioTrack->stop();
-
+
// Force loop exit
lNumSmp = 0;
break;
@@ -765,6 +1310,7 @@ bool ToneGenerator::prepareWave() {
mTotalSmp = 0;
mCurSegment = 0;
mCurCount = 0;
+ mLoopCounter = 0;
if (mpToneDesc->segments[0].duration == TONEGEN_INF) {
mNextSegSmp = TONEGEN_INF;
} else{