summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--api/current.xml715
-rw-r--r--include/media/ToneGenerator.h84
-rw-r--r--media/java/android/media/ToneGenerator.java633
-rw-r--r--media/libmedia/ToneGenerator.cpp816
-rw-r--r--telephony/java/com/android/internal/telephony/cdma/SignalToneUtil.java13
5 files changed, 1952 insertions, 309 deletions
diff --git a/api/current.xml b/api/current.xml
index b28780c..595a9f0 100644
--- a/api/current.xml
+++ b/api/current.xml
@@ -71778,6 +71778,721 @@
visibility="public"
>
</field>
+<field name="TONE_CDMA_ABBR_ALERT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="97"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_ABBR_INTERCEPT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="37"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_ABBR_REORDER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="39"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_ALERT_AUTOREDIAL_LITE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="87"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_ALERT_CALL_GUARD"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="93"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_ALERT_INCALL_LITE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="91"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_ALERT_NETWORK_LITE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="86"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_ANSWER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="42"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_CALLDROP_LITE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="95"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_CALL_SIGNAL_ISDN_INTERGROUP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="46"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_CALL_SIGNAL_ISDN_NORMAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="45"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_CALL_SIGNAL_ISDN_PAT3"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="48"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_CALL_SIGNAL_ISDN_PAT5"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="50"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_CALL_SIGNAL_ISDN_PAT6"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="51"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_CALL_SIGNAL_ISDN_PAT7"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="52"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_CALL_SIGNAL_ISDN_PING_RING"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="49"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_CALL_SIGNAL_ISDN_SP_PRI"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="47"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_CONFIRM"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="41"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_DIAL_TONE_LITE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="34"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_EMERGENCY_RINGBACK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="92"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_HIGH_L"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="53"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_HIGH_PBX_L"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="71"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_HIGH_PBX_SLS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="80"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_HIGH_PBX_SS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="74"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_HIGH_PBX_SSL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="77"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_HIGH_PBX_S_X4"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="83"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_HIGH_SLS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="65"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_HIGH_SS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="56"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_HIGH_SSL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="59"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_HIGH_SS_2"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="62"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_HIGH_S_X4"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="68"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_INTERCEPT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_KEYPAD_VOLUME_KEY_LITE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="89"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_LOW_L"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="55"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_LOW_PBX_L"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="73"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_LOW_PBX_SLS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="82"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_LOW_PBX_SS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="76"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_LOW_PBX_SSL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="79"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_LOW_PBX_S_X4"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="85"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_LOW_SLS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="67"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_LOW_SS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="58"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_LOW_SSL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="61"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_LOW_SS_2"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="64"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_LOW_S_X4"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="70"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_MED_L"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="54"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_MED_PBX_L"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="72"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_MED_PBX_SLS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="81"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_MED_PBX_SS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="75"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_MED_PBX_SSL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="78"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_MED_PBX_S_X4"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="84"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_MED_SLS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="66"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_MED_SS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="57"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_MED_SSL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="60"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_MED_SS_2"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="63"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_MED_S_X4"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="69"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_NETWORK_BUSY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="40"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_NETWORK_BUSY_ONE_SHOT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="96"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_NETWORK_CALLWAITING"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="43"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_NETWORK_USA_RINGBACK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="35"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_ONE_MIN_BEEP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="88"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_PIP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="44"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_PRESSHOLDKEY_LITE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="90"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_REORDER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="38"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_SIGNAL_OFF"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="98"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TONE_CDMA_SOFT_ERROR_LITE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="94"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
<field name="TONE_DTMF_0"
type="int"
transient="false"
diff --git a/include/media/ToneGenerator.h b/include/media/ToneGenerator.h
index 6b0cc8a..eafa661 100644
--- a/include/media/ToneGenerator.h
+++ b/include/media/ToneGenerator.h
@@ -71,6 +71,82 @@ public:
TONE_SUP_CONGESTION_ABBREV, // Abbreviated congestion: congestion tone limited to 4 seconds
TONE_SUP_CONFIRM, // Confirm tone: a 350 Hz tone added to a 440 Hz tone repeated 3 times in a 100 ms on, 100 ms off cycle.
TONE_SUP_PIP, // Pip tone: four bursts of 480 Hz tone (0.1 s on, 0.1 s off).
+
+ // CDMA Tones
+ TONE_CDMA_DIAL_TONE_LITE,
+ TONE_CDMA_NETWORK_USA_RINGBACK,
+ TONE_CDMA_INTERCEPT,
+ TONE_CDMA_ABBR_INTERCEPT,
+ TONE_CDMA_REORDER,
+ TONE_CDMA_ABBR_REORDER,
+ TONE_CDMA_NETWORK_BUSY,
+ TONE_CDMA_CONFIRM,
+ TONE_CDMA_ANSWER,
+ TONE_CDMA_NETWORK_CALLWAITING,
+ TONE_CDMA_PIP,
+
+ // ISDN
+ TONE_CDMA_CALL_SIGNAL_ISDN_NORMAL, // ISDN Alert Normal
+ TONE_CDMA_CALL_SIGNAL_ISDN_INTERGROUP, // ISDN Intergroup
+ TONE_CDMA_CALL_SIGNAL_ISDN_SP_PRI, // ISDN SP PRI
+ TONE_CDMA_CALL_SIGNAL_ISDN_PAT3, // ISDN Alert PAT3
+ TONE_CDMA_CALL_SIGNAL_ISDN_PING_RING, // ISDN Alert PING RING
+ TONE_CDMA_CALL_SIGNAL_ISDN_PAT5, // ISDN Alert PAT5
+ TONE_CDMA_CALL_SIGNAL_ISDN_PAT6, // ISDN Alert PAT6
+ TONE_CDMA_CALL_SIGNAL_ISDN_PAT7, // ISDN Alert PAT7
+ // ISDN end
+
+ // IS54
+ TONE_CDMA_HIGH_L, // IS54 High Pitch Long
+ TONE_CDMA_MED_L, // IS54 Med Pitch Long
+ TONE_CDMA_LOW_L, // IS54 Low Pitch Long
+ TONE_CDMA_HIGH_SS, // IS54 High Pitch Short Short
+ TONE_CDMA_MED_SS, // IS54 Medium Pitch Short Short
+ TONE_CDMA_LOW_SS, // IS54 Low Pitch Short Short
+ TONE_CDMA_HIGH_SSL, // IS54 High Pitch Short Short Long
+ TONE_CDMA_MED_SSL, // IS54 Medium Pitch Short Short Long
+ TONE_CDMA_LOW_SSL, // IS54 Low Pitch Short Short Long
+ TONE_CDMA_HIGH_SS_2, // IS54 High Pitch Short Short 2
+ TONE_CDMA_MED_SS_2, // IS54 Med Pitch Short Short 2
+ TONE_CDMA_LOW_SS_2, // IS54 Low Pitch Short Short 2
+ TONE_CDMA_HIGH_SLS, // IS54 High Pitch Short Long Short
+ TONE_CDMA_MED_SLS, // IS54 Med Pitch Short Long Short
+ TONE_CDMA_LOW_SLS, // IS54 Low Pitch Short Long Short
+ TONE_CDMA_HIGH_S_X4, // IS54 High Pitch Short Short Short Short
+ TONE_CDMA_MED_S_X4, // IS54 Med Pitch Short Short Short Short
+ TONE_CDMA_LOW_S_X4, // IS54 Low Pitch Short Short Short Short
+ TONE_CDMA_HIGH_PBX_L, // PBX High Pitch Long
+ TONE_CDMA_MED_PBX_L, // PBX Med Pitch Long
+ TONE_CDMA_LOW_PBX_L, // PBX Low Pitch Long
+ TONE_CDMA_HIGH_PBX_SS, // PBX High Short Short
+ TONE_CDMA_MED_PBX_SS, // PBX Med Short Short
+ TONE_CDMA_LOW_PBX_SS, // PBX Low Short Short
+ TONE_CDMA_HIGH_PBX_SSL, // PBX High Short Short Long
+ TONE_CDMA_MED_PBX_SSL, // PBX Med Short Short Long
+ TONE_CDMA_LOW_PBX_SSL, // PBX Low Short Short Long
+ TONE_CDMA_HIGH_PBX_SLS, // PBX High SLS
+ TONE_CDMA_MED_PBX_SLS, // PBX Med SLS
+ TONE_CDMA_LOW_PBX_SLS, // PBX Low SLS
+ TONE_CDMA_HIGH_PBX_S_X4, // PBX High SSSS
+ TONE_CDMA_MED_PBX_S_X4, // PBX Med SSSS
+ TONE_CDMA_LOW_PBX_S_X4, // PBX LOW SSSS
+ //IS54 end
+ // proprietary
+ TONE_CDMA_ALERT_NETWORK_LITE,
+ TONE_CDMA_ALERT_AUTOREDIAL_LITE,
+ TONE_CDMA_ONE_MIN_BEEP,
+ TONE_CDMA_KEYPAD_VOLUME_KEY_LITE,
+ TONE_CDMA_PRESSHOLDKEY_LITE,
+ TONE_CDMA_ALERT_INCALL_LITE,
+ TONE_CDMA_EMERGENCY_RINGBACK,
+ TONE_CDMA_ALERT_CALL_GUARD,
+ TONE_CDMA_SOFT_ERROR_LITE,
+ TONE_CDMA_CALLDROP_LITE,
+ // proprietary end
+ TONE_CDMA_NETWORK_BUSY_ONE_SHOT,
+ TONE_CDMA_ABBR_ALERT,
+ TONE_CDMA_SIGNAL_OFF,
+ //CDMA end
NUM_TONES,
NUM_SUP_TONES = LAST_SUP_TONE-FIRST_SUP_TONE+1
};
@@ -125,7 +201,7 @@ private:
static const unsigned char sToneMappingTable[NUM_REGIONS-1][NUM_SUP_TONES];
static const unsigned int TONEGEN_MAX_WAVES = 3; // Maximun number of sine waves in a tone segment
- static const unsigned int TONEGEN_MAX_SEGMENTS = 5; // Maximun number of segments in a tone descriptor
+ static const unsigned int TONEGEN_MAX_SEGMENTS = 12; // Maximun number of segments in a tone descriptor
static const unsigned int TONEGEN_INF = 0xFFFFFFFF; // Represents infinite time duration
static const float TONEGEN_GAIN = 0.9; // Default gain passed to WaveGenerator().
@@ -140,6 +216,8 @@ private:
// correspond to tone ON state and segments with odd index to OFF state.
// The data stored in segments[] is the duration of the corresponding period in ms.
// The first segment encountered with a 0 duration indicates that no more segment follows.
+ // - loopCnt - Number of times to repeat a sequence of seqments after playing this
+ // - loopIndx - The segment index to go back and play is loopcnt > 0
// - repeatCnt indicates the number of times the sequence described by segments[] array must be repeated.
// When the tone generator encounters the first 0 duration segment, it will compare repeatCnt to mCurCount.
// If mCurCount > repeatCnt, the tone is stopped automatically. Otherwise, tone sequence will be
@@ -150,6 +228,8 @@ private:
public:
unsigned int duration;
unsigned short waveFreq[TONEGEN_MAX_WAVES+1];
+ unsigned short loopCnt;
+ unsigned short loopIndx;
};
class ToneDescriptor {
@@ -174,6 +254,8 @@ private:
const ToneDescriptor *mpToneDesc; // pointer to active tone descriptor
const ToneDescriptor *mpNewToneDesc; // pointer to next active tone descriptor
+ unsigned short mLoopCounter; // Current tone loopback count
+
int mSamplingRate; // AudioFlinger Sampling rate
AudioTrack *mpAudioTrack; // Pointer to audio track used for playback
Mutex mLock; // Mutex to control concurent access to ToneGenerator object from audio callback and application API
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{
diff --git a/telephony/java/com/android/internal/telephony/cdma/SignalToneUtil.java b/telephony/java/com/android/internal/telephony/cdma/SignalToneUtil.java
index 925a755..44958e9 100644
--- a/telephony/java/com/android/internal/telephony/cdma/SignalToneUtil.java
+++ b/telephony/java/com/android/internal/telephony/cdma/SignalToneUtil.java
@@ -22,6 +22,9 @@ import android.util.Log;
import android.media.ToneGenerator;
public class SignalToneUtil {
+ /** A marker that isn't a valid TONE */
+ public static final int CDMA_INVALID_TONE = -1;
+
// public final int int IS95_CONST_IR_SIGNAL_TYPE_TYPE;
static public final int IS95_CONST_IR_SIGNAL_TONE = 0;
static public final int IS95_CONST_IR_SIGNAL_ISDN = 1;
@@ -76,7 +79,7 @@ public class SignalToneUtil {
private static Integer signalParamHash(int signalType, int alertPitch, int signal) {
if ((signalType < 0) || (signalType > 256) || (alertPitch > 256) ||
(alertPitch < 0) || (signal > 256) || (signal < 0)) {
- return new Integer(ToneGenerator.TONE_CDMA_INVALID);
+ return new Integer(CDMA_INVALID_TONE);
}
return new Integer(signalType * 256 * 256 + alertPitch * 256 + signal);
}
@@ -84,7 +87,7 @@ public class SignalToneUtil {
public static int getAudioToneFromSignalInfo(int signalType, int alertPitch, int signal) {
Integer result = hm.get(signalParamHash(signalType, alertPitch, signal));
if (result == null) {
- return ToneGenerator.TONE_CDMA_INVALID;
+ return CDMA_INVALID_TONE;
}
return result;
}
@@ -100,13 +103,13 @@ public class SignalToneUtil {
ToneGenerator.TONE_CDMA_CALL_SIGNAL_ISDN_INTERGROUP);
hm.put(signalParamHash(IS95_CONST_IR_SIGNAL_ISDN, TAPIAMSSCDMA_SIGNAL_PITCH_UNKNOWN,
- IS95_CONST_IR_SIG_ISDN_SP_PRI), ToneGenerator.TONE_CDMA_CALL_SIGNAL_SP_PRI);
+ IS95_CONST_IR_SIG_ISDN_SP_PRI), ToneGenerator.TONE_CDMA_CALL_SIGNAL_ISDN_SP_PRI);
hm.put(signalParamHash(IS95_CONST_IR_SIGNAL_ISDN, TAPIAMSSCDMA_SIGNAL_PITCH_UNKNOWN,
IS95_CONST_IR_SIG_ISDN_PAT_3), ToneGenerator.TONE_CDMA_CALL_SIGNAL_ISDN_PAT3);
hm.put(signalParamHash(IS95_CONST_IR_SIGNAL_ISDN, TAPIAMSSCDMA_SIGNAL_PITCH_UNKNOWN,
- IS95_CONST_IR_SIG_ISDN_PING), ToneGenerator.TONE_CDMA_CALL_SIGNAL_ISDN_RING_RING);
+ IS95_CONST_IR_SIG_ISDN_PING), ToneGenerator.TONE_CDMA_CALL_SIGNAL_ISDN_PING_RING);
hm.put(signalParamHash(IS95_CONST_IR_SIGNAL_ISDN, TAPIAMSSCDMA_SIGNAL_PITCH_UNKNOWN,
IS95_CONST_IR_SIG_ISDN_PAT_5), ToneGenerator.TONE_CDMA_CALL_SIGNAL_ISDN_PAT5);
@@ -163,7 +166,7 @@ public class SignalToneUtil {
IS95_CONST_IR_SIG_IS54B_L), ToneGenerator.TONE_CDMA_HIGH_L);
hm.put(signalParamHash(IS95_CONST_IR_SIGNAL_IS54B, IS95_CONST_IR_ALERT_MED,
- IS95_CONST_IR_SIG_IS54B_L), ToneGenerator.TONE_CDMA_INVALID);
+ IS95_CONST_IR_SIG_IS54B_L), ToneGenerator.TONE_CDMA_MED_L);
hm.put(signalParamHash(IS95_CONST_IR_SIGNAL_IS54B, IS95_CONST_IR_ALERT_LOW,
IS95_CONST_IR_SIG_IS54B_L), ToneGenerator.TONE_CDMA_LOW_L);