Most visited

Recently visited

Added in API level 1

ToneGenerator

public class ToneGenerator
extends Object

java.lang.Object
   ↳ android.media.ToneGenerator


此类提供播放DTMF音调(ITU-T建议Q.23),呼叫监管音调(3GPP TS 22.001,CEPT)和专有音调(3GPP TS 31.111)的方法。 根据呼叫状态和路由选项,音调会混合到下行音频或输出到扬声器电话或耳机。 此API不用于通过上行音频路径生成音调。

Summary

Constants

int MAX_VOLUME

最大音量,用于 ToneGenerator(int, int)

int MIN_VOLUME

最小音量设置,用于 ToneGenerator(int, int)

int TONE_CDMA_ABBR_ALERT

CDMA_ABBR_ALERT音调:1150Hz + 770Hz 400ms开启

int TONE_CDMA_ABBR_INTERCEPT

CDMA Abbr监听音:440Hz 250ms ON,620Hz 250ms ON

int TONE_CDMA_ABBR_REORDER

CDMA Abbr重拨音:480Hz + 620Hz 250ms开启,250ms关闭重复8次

int TONE_CDMA_ALERT_AUTOREDIAL_LITE

CDMA警报自动重拨音:{1245Hz 62ms ON,659Hz 62ms ON} 3次,1245 62ms ON

int TONE_CDMA_ALERT_CALL_GUARD

CDMA警报呼叫警告音:{1319Hz 125ms ON,125ms OFF} 3次

int TONE_CDMA_ALERT_INCALL_LITE

CDMA ALERT INCALL LITE音频:587Hz 62ms,784 62ms,831Hz 62ms,784Hz 62ms,1109 62ms,784Hz 62ms,831Hz 62ms,784Hz 62ms

int TONE_CDMA_ALERT_NETWORK_LITE

CDMA警报网络音色:1109Hz 62ms开启,784Hz 62ms开启,740Hz 62ms开启622Hz 62ms开启,1109Hz 62ms开启

int TONE_CDMA_ANSWER

CDMA应答音:静音 - 定义频率0,0ms ON,0ms OFF

int TONE_CDMA_CALLDROP_LITE

CDMA CALLDROP LITE音色:1480Hz 125ms,1397Hz 125ms,784Hz 125ms

int TONE_CDMA_CALL_SIGNAL_ISDN_INTERGROUP

ISDN呼叫信号组间音:{2091Hz 32ms ON,2556 64ms ON} 8次,2091Hz 32ms ON,400ms OFF,{2091Hz 32ms ON,2556Hz 64ms ON}次,2091Hz 32ms ON,4s OFF。

int TONE_CDMA_CALL_SIGNAL_ISDN_NORMAL

ISDN呼叫信号正常音频:{2091Hz 32ms ON,2556 64ms ON} 20次,2091 32ms ON,2556 48ms ON,4s OFF

int TONE_CDMA_CALL_SIGNAL_ISDN_PAT3

ISDN呼号PAT3音:无声音

int TONE_CDMA_CALL_SIGNAL_ISDN_PAT5

ISDN Pat5音:静音

int TONE_CDMA_CALL_SIGNAL_ISDN_PAT6

ISDN Pat6音:静音

int TONE_CDMA_CALL_SIGNAL_ISDN_PAT7

ISDN Pat7音:无声音

int TONE_CDMA_CALL_SIGNAL_ISDN_PING_RING

ISDN Ping铃声:{2091Hz 32ms ON,2556Hz 64ms ON} 5次2091Hz 20ms ON

int TONE_CDMA_CALL_SIGNAL_ISDN_SP_PRI

ISDN呼叫信号SP PRI音:{2091Hz 32ms ON,2556 64ms ON} 4次2091Hz 16ms ON,200ms OFF,{2091Hz 32ms ON,2556Hz 64ms ON} 4次,2091Hz 16ms ON,200ms OFF

int TONE_CDMA_CONFIRM

CDMA确认音:350Hz + 440Hz 100ms ON,100ms OFF重复3次

int TONE_CDMA_DIAL_TONE_LITE

CDMA拨号音:425Hz连续

int TONE_CDMA_EMERGENCY_RINGBACK

CDMA紧急响响音:{941Hz 125ms开,10ms关} 3次4990ms关,重复...

int TONE_CDMA_HIGH_L

TONE_CDMA_HIGH_L音:{3700Hz 25ms,4000Hz 25ms} 40次4000ms OFF,重复....

int TONE_CDMA_HIGH_PBX_L

CDMA高级集团电话L:{3700Hz 25ms,4000Hz 25ms} 20次,2000ms关闭,REPEAT ....

int TONE_CDMA_HIGH_PBX_SLS

CDMA高级PBX SSL音:{3700Hz 25ms,4000Hz 25ms} 8次200ms关,{3700Hz 25ms,4000Hz 25ms} 16次,200ms关,{3700Hz 25ms,4000Hz 25ms} 8次,1000ms关,REPEAT ....

int TONE_CDMA_HIGH_PBX_SS

CDMA高级PBX SS音:{3700Hz 25ms,4000Hz 25ms} 8次200ms OFF,{3700Hz 25ms 4000Hz 25ms} 8次,2000ms OFF,REPEAT ....

int TONE_CDMA_HIGH_PBX_SSL

CDMA高级PBX SSL音:{3700Hz 25ms,4000Hz 25ms} 8次200ms关,{3700Hz 25ms,4000Hz 25ms} 8次,200ms关,{3700Hz 25ms,4000Hz 25ms} 16次,1000ms关,REPEAT ....

int TONE_CDMA_HIGH_PBX_S_X4

CDMA高级PBX X S4音:{3700Hz 25ms 4000Hz 25ms} 8次,200ms关,{3700Hz 25ms 4000Hz 25ms} 8次,200ms关,{3700Hz 25ms 4000Hz 25ms} 8次,200ms关{3700Hz 25ms 4000Hz 25ms} 8次,800ms关闭,REPEAT ...

int TONE_CDMA_HIGH_SLS

CDMA高SLS音:{3700Hz 25ms,4000Hz 25ms} 10次,500ms关,{3700Hz 25ms,4000Hz 25ms} 20次,500ms关,{3700Hz 25ms,4000Hz 25ms} 10次,3000ms关,REPEAT

int TONE_CDMA_HIGH_SS

CDMA高SS音:{3700Hz 25ms,4000Hz 25ms}重复16次,400ms关,重复....

int TONE_CDMA_HIGH_SSL

CDMA高级SSL音:{3700Hz 25ms,4000Hz 25ms} 8次,200ms关,{3700Hz 25ms,4000Hz 25ms}重复8次,200ms关,{3700Hz 25ms,4000Hz 25ms}重复16次,4000ms关,重复...

int TONE_CDMA_HIGH_SS_2

CDMA高SS2音:{3700Hz 25ms,4000Hz 25ms} 20次,1000ms关,{3700Hz 25ms,4000Hz 25ms} 20次,3000ms关,重复....

int TONE_CDMA_HIGH_S_X4

CDMA高S X4音:{3700Hz 25ms,4000Hz 25ms} 10次,500ms关,{3700Hz 25ms,4000Hz 25ms} 10次,500ms关,{3700Hz 25ms,4000Hz 25ms} 10次,500ms关,{3700Hz 25ms,4000Hz 25ms} 10次,2500ms关,REPEAT ....

int TONE_CDMA_INTERCEPT

CDMA监听音:440Hz 250ms ON,620Hz 250ms ON ...

int TONE_CDMA_KEYPAD_VOLUME_KEY_LITE

CDMA键盘音量键音频:941Hz + 1477Hz 120ms开

int TONE_CDMA_LOW_L

TONE_CDMA_LOW_L音:{1300Hz 25ms,1450Hz 25ms} 40次,4000ms OFF,重复....

int TONE_CDMA_LOW_PBX_L

CDMA低级集团电话L:{1300Hz 25ms,1450Hz 25ms} 20次,2000ms关闭,REPEAT ....

int TONE_CDMA_LOW_PBX_SLS

CDMA高级PBX SLS音频:{1300Hz 25ms,1450Hz 25ms} 8次200ms关闭,{1300Hz 25ms,1450Hz 25ms} 16次,200ms关闭,{1300Hz 25ms,1450Hz 25ms} 8次,1000ms关闭,REPEAT ....

int TONE_CDMA_LOW_PBX_SS

CDMA低级PBX SS音:{1300Hz 25ms,1450Hz 25ms} 8次200ms OFF,{1300Hz 25ms 1450Hz 25ms} 8次,2000ms OFF,REPEAT ....

int TONE_CDMA_LOW_PBX_SSL

CDMA低级PBX SSL音:{1300Hz 25ms,1450Hz 25ms} 8次200ms关,{1300Hz 25ms,1450Hz 25ms} 8次,200ms关,{1300Hz 25ms,1450Hz 25ms} 16次,1000ms关,REPEAT ....

int TONE_CDMA_LOW_PBX_S_X4

CDMA低PBX X S4音:{1300Hz 25ms 1450Hz 25ms} 8次,200ms关,{1300Hz 25ms 1450Hz 25ms} 8次,200ms关,{1300Hz 25ms 1450Hz 25ms} 8次,200ms关,{1300Hz 25ms 1450Hz 25ms} 8次,800ms关闭,REPEAT ...

int TONE_CDMA_LOW_SLS

CDMA低SLS音:{1300Hz 25ms,1450Hz 25ms} 10次,500ms关,{1300Hz 25ms,1450Hz 25ms} 20次,500ms关,{1300Hz 25ms,1450Hz 25ms} 10次,3000ms关,REPEAT

int TONE_CDMA_LOW_SS

CDMA低SS音:{1300z 25ms,1450Hz 25ms}重复16次,400ms关,重复....

int TONE_CDMA_LOW_SSL

CDMA低SSL音:{1300Hz 25ms,1450Hz 25ms} 8次,200ms关,{1300Hz 25ms,1450Hz 25ms}重复8次,200ms关,{1300Hz 25ms,1450Hz 25ms}重复16次,4000ms关,重复...

int TONE_CDMA_LOW_SS_2

CDMA低SS2音:{1300Hz 25ms,1450Hz 25ms} 20次,1000ms关,{1300Hz 25ms,1450Hz 25ms} 20次,3000ms关,重复....

int TONE_CDMA_LOW_S_X4

CDMA低S X4音:{2600Hz 25ms,2900Hz 25ms} 10次,500ms关,{2600Hz 25ms,2900Hz 25ms} 10次,500ms关,{2600Hz 25ms,2900Hz 25ms} 10次,500ms关,{2600Hz 25ms,2900Hz 25ms} 10次,2500ms关,REPEAT ....

int TONE_CDMA_MED_L

TONE_CDMA_MED_L音:{2600Hz 25ms,2900Hz 25ms} 40次4000ms OFF,重复....

int TONE_CDMA_MED_PBX_L

CDMA MED PBX L:{2600Hz 25ms,2900Hz 25ms} 20次,2000ms OFF,REPEAT ....

int TONE_CDMA_MED_PBX_SLS

CDMA高级PBX SLS音频:{2600Hz 25ms,2900Hz 25ms} 8次200ms关闭,{2600Hz 25ms,2900Hz 25ms} 16次,200ms关闭,{2600Hz 25ms,2900Hz 25ms} 8次,1000ms关闭,REPEAT ....

int TONE_CDMA_MED_PBX_SS

CDMA MED PBX SS音:{2600Hz 25ms,2900Hz 25ms} 8次200ms OFF,{2600Hz 25ms 2900Hz 25ms} 8次,2000ms OFF,REPEAT ....

int TONE_CDMA_MED_PBX_SSL

CDMA MED PBX SSL音:{2600Hz 25ms,2900Hz 25ms} 8次200ms关,{2600Hz 25ms,2900Hz 25ms} 8次,200ms关,{2600Hz 25ms,2900Hz 25ms} 16次,1000ms关,REPEAT ....

int TONE_CDMA_MED_PBX_S_X4

CDMA MED PBX X S4音:{2600Hz 25ms 2900Hz 25ms} 8次,200ms关,{2600Hz 25ms 2900Hz 25ms} 8次,200ms关,{2600Hz 25ms 2900Hz 25ms} 8次,200ms关,{2600Hz 25ms 2900Hz 25ms} 8次,800ms关闭,REPEAT ...

int TONE_CDMA_MED_SLS

CDMA MED SLS音:{2600Hz 25ms,2900Hz 25ms} 10次,500ms关,{2600Hz 25ms,2900Hz 25ms} 20次,500ms关,{2600Hz 25ms,2900Hz 25ms} 10次,3000ms关,REPEAT

int TONE_CDMA_MED_SS

CDMA MED SS音调:{2600Hz 25ms,2900Hz 25ms}重复16次,关闭400ms,重复....

int TONE_CDMA_MED_SSL

CDMA MED音调:{2600Hz 25ms,2900Hz 25ms} 8次,200ms关,{2600Hz 25ms,2900Hz 25ms}重复8次,200ms关,{2600Hz 25ms,2900Hz 25ms}重复16次,4000ms关闭,重复...

int TONE_CDMA_MED_SS_2

CDMA MED SS2音:{2600Hz 25ms,2900Hz 25ms} 20次,1000ms关,{2600Hz 25ms,2900Hz 25ms} 20次,3000ms关,重复....

int TONE_CDMA_MED_S_X4

CDMA MED S X4音:{2600Hz 25ms,2900Hz 25ms} 10次,500ms关,{2600Hz 25ms,2900Hz 25ms} 10次,500ms关,{2600Hz 25ms,2900Hz 25ms} 10次,500ms关,{2600Hz 25ms,2900Hz 25ms} 10次,2500ms关,REPEAT ....

int TONE_CDMA_NETWORK_BUSY

CDMA网络忙音:480Hz + 620Hz开启500ms,持续500ms关闭

int TONE_CDMA_NETWORK_BUSY_ONE_SHOT

CDMA_NETWORK_BUSY_ONE_SHOT音调:425Hz开启500ms,关闭500ms。

int TONE_CDMA_NETWORK_CALLWAITING

CDMA网络呼叫等待音:440Hz 300ms开

int TONE_CDMA_NETWORK_USA_RINGBACK

CDMA美国回铃:440Hz + 480Hz 2s ON,4000 OFF ...

int TONE_CDMA_ONE_MIN_BEEP

CDMA一分钟哔声:1150Hz + 770Hz 400ms开启

int TONE_CDMA_PIP

CDMA PIP音频:480Hz 100ms开启,100ms关闭重复4次

int TONE_CDMA_PRESSHOLDKEY_LITE

CDMA PRESSHOLDKEY LITE音频:587Hz 375ms ON,1175Hz 125ms ON

int TONE_CDMA_REORDER

CDMA重拨音:480Hz + 620Hz开启250ms,关闭...

int TONE_CDMA_SIGNAL_OFF

CDMA_SIGNAL_OFF - 静音

int TONE_CDMA_SOFT_ERROR_LITE

CDMA SOFT ERROR LITE音频:1047Hz 125ms开启,370Hz 125ms

int TONE_DTMF_0

键0的DTMF音:1336Hz,941Hz,连续

int TONE_DTMF_1

键1的DTMF音:1209Hz,697Hz,连续

int TONE_DTMF_2

键2的DTMF音:1336Hz,697Hz,连续

int TONE_DTMF_3

键3的DTMF音:1477Hz,697Hz,连续

int TONE_DTMF_4

键4的DTMF音:1209Hz,770Hz,连续

int TONE_DTMF_5

键5的DTMF音:1336Hz,770Hz,连续

int TONE_DTMF_6

键6的DTMF音:1477Hz,770Hz,连续

int TONE_DTMF_7

键7的DTMF音调:1209Hz,852Hz,连续

int TONE_DTMF_8

键8的DTMF音:1336Hz,852Hz,连续

int TONE_DTMF_9

键9的DTMF音调:1477Hz,852Hz,连续

int TONE_DTMF_A

键A的DTMF音:1633Hz,697Hz,连续

int TONE_DTMF_B

键B的DTMF音:1633Hz,770Hz,连续

int TONE_DTMF_C

键C的DTMF音:1633Hz,852Hz,连续

int TONE_DTMF_D

键D的DTMF音:1633Hz,941Hz,连续

int TONE_DTMF_P

键#的DTMF音:1477Hz,941Hz,连续

int TONE_DTMF_S

键*的DTMF音调:1209Hz,941Hz,连续

int TONE_PROP_ACK

专有声调,正确确认:1200Hz,100ms开启,100ms关闭2个脉冲串

int TONE_PROP_BEEP

专有声调,一般蜂鸣声:400Hz + 1200Hz,35ms开启

int TONE_PROP_BEEP2

专有音调,一般双重哔声:两次400Hz + 1200Hz,35ms开启,200ms关闭,35ms开启

int TONE_PROP_NACK

专有声调,否定确认:300Hz + 400Hz + 500Hz,开启400ms

int TONE_PROP_PROMPT

专有声调,提示音:400Hz + 1200Hz,200ms ON

int TONE_SUP_BUSY

通话监听音,忙:CEPT:425Hz,开500ms,500ms关...

int TONE_SUP_CALL_WAITING

呼叫监听音,呼叫等待:CEPT,JAPAN:425Hz,200ms开,600ms关,200ms开,3s关...

int TONE_SUP_CONFIRM

呼叫监听音(IS-95),确认音:在100毫秒开启,100毫秒关闭周期内将350赫兹音调添加到440赫兹音调中重复3次

int TONE_SUP_CONGESTION

呼叫管理音,拥塞:CEPT,日本:425Hz,200ms开,200ms关...

int TONE_SUP_CONGESTION_ABBREV

呼叫监控音(IS-95),简称拥塞:拥塞音限于4秒

int TONE_SUP_DIAL

呼叫监听音,拨号音:CEPT:425Hz,连续ANSI(IS-95):350Hz + 440Hz,连续JAPAN:400Hz,连续

int TONE_SUP_ERROR

通话管理音,错误/特殊信息:950Hz + 1400Hz + 1800Hz,开启330ms,关闭1秒...

int TONE_SUP_INTERCEPT

呼叫监听音(IS-95),监听音:交替440赫兹和620赫兹音,每次250毫秒

int TONE_SUP_INTERCEPT_ABBREV

呼叫管理音(IS-95),缩略截听:截听音限制为4秒

int TONE_SUP_PIP

呼叫监控音(IS-95),点音:480 Hz音调的四个脉冲(0.1 s开启,0.1 s关闭)。

int TONE_SUP_RADIO_ACK

呼叫管理音,无线电路径确认:CEPT,ANSI:425Hz,200ms ON JAPAN:400Hz,1s ON,2s OFF ...

int TONE_SUP_RADIO_NOTAVAIL

呼叫监控音,无线电路径不可用:425Hz,200ms ON,200 OFF 3脉冲

int TONE_SUP_RINGTONE

呼叫监听音,铃声:CEPT,日本:425Hz,1s开,4s关...

Public constructors

ToneGenerator(int streamType, int volume)

ToneGenerator类构造器指定输出流类型和音量。

Public methods

final int getAudioSessionId()

返回音频会话ID。

void release()

释放与此ToneGenerator对象关联的资源。

boolean startTone(int toneType, int durationMs)

此方法在指定的持续时间内开始播放指定类型的音调。

boolean startTone(int toneType)

此方法开始播放指定类型的音色。

void stopTone()

此方法可停止当前正在播放的音调。

Protected methods

void finalize()

当垃圾收集确定没有更多对该对象的引用时,由对象上的垃圾回收器调用。

Inherited methods

From class java.lang.Object

Constants

MAX_VOLUME

Added in API level 1
int MAX_VOLUME

最大音量,用于 ToneGenerator(int, int)

常量值:100(0x00000064)

MIN_VOLUME

Added in API level 1
int MIN_VOLUME

最小音量设置,用于 ToneGenerator(int, int)

常量值:0(0x00000000)

TONE_CDMA_ABBR_ALERT

Added in API level 4
int TONE_CDMA_ABBR_ALERT

CDMA_ABBR_ALERT音调:1150Hz + 770Hz 400ms开启

也可以看看:

常量值:97(0x00000061)

TONE_CDMA_ABBR_INTERCEPT

Added in API level 4
int TONE_CDMA_ABBR_INTERCEPT

CDMA Abbr监听音:440Hz 250ms ON,620Hz 250ms ON

也可以看看:

常量值:37(0x00000025)

TONE_CDMA_ABBR_REORDER

Added in API level 4
int TONE_CDMA_ABBR_REORDER

CDMA Abbr重拨音:480Hz + 620Hz 250ms开启,250ms关闭重复8次

也可以看看:

常量值:39(0x00000027)

TONE_CDMA_ALERT_AUTOREDIAL_LITE

Added in API level 4
int TONE_CDMA_ALERT_AUTOREDIAL_LITE

CDMA警报自动重拨音:{1245Hz 62ms ON,659Hz 62ms ON} 3次,1245 62ms ON

也可以看看:

常量值:87(0x00000057)

TONE_CDMA_ALERT_CALL_GUARD

Added in API level 4
int TONE_CDMA_ALERT_CALL_GUARD

CDMA警报呼叫警告音:{1319Hz 125ms ON,125ms OFF} 3次

也可以看看:

常量值:93(0x0000005d)

TONE_CDMA_ALERT_INCALL_LITE

Added in API level 4
int TONE_CDMA_ALERT_INCALL_LITE

CDMA ALERT INCALL LITE音频:587Hz 62ms,784 62ms,831Hz 62ms,784Hz 62ms,1109 62ms,784Hz 62ms,831Hz 62ms,784Hz 62ms

也可以看看:

常量值:91(0x0000005b)

TONE_CDMA_ALERT_NETWORK_LITE

Added in API level 4
int TONE_CDMA_ALERT_NETWORK_LITE

CDMA警报网络音色:1109Hz 62ms开启,784Hz 62ms开启,740Hz 62ms开启622Hz 62ms开启,1109Hz 62ms开启

也可以看看:

常量值:86(0x00000056)

TONE_CDMA_ANSWER

Added in API level 4
int TONE_CDMA_ANSWER

CDMA应答音:静音 - 定义频率0,0ms ON,0ms OFF

也可以看看:

常量值:42(0x0000002a)

TONE_CDMA_CALLDROP_LITE

Added in API level 4
int TONE_CDMA_CALLDROP_LITE

CDMA CALLDROP LITE音色:1480Hz 125ms,1397Hz 125ms,784Hz 125ms

也可以看看:

常量值:95(0x0000005f)

TONE_CDMA_CALL_SIGNAL_ISDN_INTERGROUP

Added in API level 4
int TONE_CDMA_CALL_SIGNAL_ISDN_INTERGROUP

ISDN呼叫信号组间音:{2091Hz 32ms ON,2556 64ms ON} 8次,2091Hz 32ms ON,400ms OFF,{2091Hz 32ms ON,2556Hz 64ms ON}次,2091Hz 32ms ON,4s OFF。

也可以看看:

常量值:46(0x0000002e)

TONE_CDMA_CALL_SIGNAL_ISDN_NORMAL

Added in API level 4
int TONE_CDMA_CALL_SIGNAL_ISDN_NORMAL

ISDN呼叫信号正常音频:{2091Hz 32ms ON,2556 64ms ON} 20次,2091 32ms ON,2556 48ms ON,4s OFF

也可以看看:

常量值:45(0x0000002d)

TONE_CDMA_CALL_SIGNAL_ISDN_PAT3

Added in API level 4
int TONE_CDMA_CALL_SIGNAL_ISDN_PAT3

ISDN呼号PAT3音:无声音

也可以看看:

常量值:48(0x00000030)

TONE_CDMA_CALL_SIGNAL_ISDN_PAT5

Added in API level 4
int TONE_CDMA_CALL_SIGNAL_ISDN_PAT5

ISDN Pat5音:静音

也可以看看:

常量值:50(0x00000032)

TONE_CDMA_CALL_SIGNAL_ISDN_PAT6

Added in API level 4
int TONE_CDMA_CALL_SIGNAL_ISDN_PAT6

ISDN Pat6音:静音

也可以看看:

常量值:51(0x00000033)

TONE_CDMA_CALL_SIGNAL_ISDN_PAT7

Added in API level 4
int TONE_CDMA_CALL_SIGNAL_ISDN_PAT7

ISDN Pat7音:无声音

也可以看看:

常量值:52(0x00000034)

TONE_CDMA_CALL_SIGNAL_ISDN_PING_RING

Added in API level 4
int TONE_CDMA_CALL_SIGNAL_ISDN_PING_RING

ISDN Ping铃声:{2091Hz 32ms ON,2556Hz 64ms ON} 5次2091Hz 20ms ON

也可以看看:

常量值:49(0x00000031)

TONE_CDMA_CALL_SIGNAL_ISDN_SP_PRI

Added in API level 4
int TONE_CDMA_CALL_SIGNAL_ISDN_SP_PRI

ISDN呼叫信号SP PRI音:{2091Hz 32ms ON,2556 64ms ON} 4次2091Hz 16ms ON,200ms OFF,{2091Hz 32ms ON,2556Hz 64ms ON} 4次,2091Hz 16ms ON,200ms OFF

也可以看看:

常量值:47(0x0000002f)

TONE_CDMA_CONFIRM

Added in API level 4
int TONE_CDMA_CONFIRM

CDMA确认音:350Hz + 440Hz 100ms ON,100ms OFF重复3次

也可以看看:

常量值:41(0x00000029)

TONE_CDMA_DIAL_TONE_LITE

Added in API level 4
int TONE_CDMA_DIAL_TONE_LITE

CDMA拨号音:425Hz连续

也可以看看:

常量值:34(0x00000022)

TONE_CDMA_EMERGENCY_RINGBACK

Added in API level 4
int TONE_CDMA_EMERGENCY_RINGBACK

CDMA紧急响响音:{941Hz 125ms开,10ms关} 3次4990ms关,重复...

也可以看看:

常量值:92(0x0000005c)

TONE_CDMA_HIGH_L

Added in API level 4
int TONE_CDMA_HIGH_L

TONE_CDMA_HIGH_L音:{3700Hz 25ms,4000Hz 25ms} 40次4000ms OFF,重复....

也可以看看:

常量值:53(0x00000035)

TONE_CDMA_HIGH_PBX_L

Added in API level 4
int TONE_CDMA_HIGH_PBX_L

CDMA高级集团电话L:{3700Hz 25ms,4000Hz 25ms} 20次,2000ms关闭,REPEAT ....

也可以看看:

常量值:71(0x00000047)

TONE_CDMA_HIGH_PBX_SLS

Added in API level 4
int TONE_CDMA_HIGH_PBX_SLS

CDMA高级PBX SSL音:{3700Hz 25ms,4000Hz 25ms} 8次200ms关,{3700Hz 25ms,4000Hz 25ms} 16次,200ms关,{3700Hz 25ms,4000Hz 25ms} 8次,1000ms关,REPEAT ....

也可以看看:

常数值:80(0x00000050)

TONE_CDMA_HIGH_PBX_SS

Added in API level 4
int TONE_CDMA_HIGH_PBX_SS

CDMA高级PBX SS音:{3700Hz 25ms,4000Hz 25ms} 8次200ms OFF,{3700Hz 25ms 4000Hz 25ms} 8次,2000ms OFF,REPEAT ....

也可以看看:

常量值:74(0x0000004a)

TONE_CDMA_HIGH_PBX_SSL

Added in API level 4
int TONE_CDMA_HIGH_PBX_SSL

CDMA高级PBX SSL音:{3700Hz 25ms,4000Hz 25ms} 8次200ms关,{3700Hz 25ms,4000Hz 25ms} 8次,200ms关,{3700Hz 25ms,4000Hz 25ms} 16次,1000ms关,REPEAT ....

也可以看看:

常量值:77(0x0000004d)

TONE_CDMA_HIGH_PBX_S_X4

Added in API level 4
int TONE_CDMA_HIGH_PBX_S_X4

CDMA高级PBX X S4音:{3700Hz 25ms 4000Hz 25ms} 8次,200ms关,{3700Hz 25ms 4000Hz 25ms} 8次,200ms关,{3700Hz 25ms 4000Hz 25ms} 8次,200ms关{3700Hz 25ms 4000Hz 25ms} 8次,800ms关闭,REPEAT ...

也可以看看:

常量值:83(0x00000053)

TONE_CDMA_HIGH_SLS

Added in API level 4
int TONE_CDMA_HIGH_SLS

CDMA高SLS音:{3700Hz 25ms,4000Hz 25ms} 10次,500ms关,{3700Hz 25ms,4000Hz 25ms} 20次,500ms关,{3700Hz 25ms,4000Hz 25ms} 10次,3000ms关,REPEAT

也可以看看:

常量值:65(0x00000041)

TONE_CDMA_HIGH_SS

Added in API level 4
int TONE_CDMA_HIGH_SS

CDMA高SS音:{3700Hz 25ms,4000Hz 25ms}重复16次,400ms关,重复....

也可以看看:

常量值:56(0x00000038)

TONE_CDMA_HIGH_SSL

Added in API level 4
int TONE_CDMA_HIGH_SSL

CDMA高级SSL音:{3700Hz 25ms,4000Hz 25ms} 8次,200ms关,{3700Hz 25ms,4000Hz 25ms}重复8次,200ms关,{3700Hz 25ms,4000Hz 25ms}重复16次,4000ms关,重复...

也可以看看:

常量值:59(0x0000003b)

TONE_CDMA_HIGH_SS_2

Added in API level 4
int TONE_CDMA_HIGH_SS_2

CDMA高SS2音:{3700Hz 25ms,4000Hz 25ms} 20次,1000ms关,{3700Hz 25ms,4000Hz 25ms} 20次,3000ms关,重复....

也可以看看:

常量值:62(0x0000003e)

TONE_CDMA_HIGH_S_X4

Added in API level 4
int TONE_CDMA_HIGH_S_X4

CDMA高S X4音:{3700Hz 25ms,4000Hz 25ms} 10次,500ms关,{3700Hz 25ms,4000Hz 25ms} 10次,500ms关,{3700Hz 25ms,4000Hz 25ms} 10次,500ms关,{3700Hz 25ms,4000Hz 25ms} 10次,2500ms关,REPEAT ....

也可以看看:

常量值:68(0x00000044)

TONE_CDMA_INTERCEPT

Added in API level 4
int TONE_CDMA_INTERCEPT

CDMA监听音:440Hz 250ms ON,620Hz 250ms ON ...

也可以看看:

常量值:36(0x00000024)

TONE_CDMA_KEYPAD_VOLUME_KEY_LITE

Added in API level 4
int TONE_CDMA_KEYPAD_VOLUME_KEY_LITE

CDMA键盘音量键音频:941Hz + 1477Hz 120ms开

也可以看看:

常量值:89(0x00000059)

TONE_CDMA_LOW_L

Added in API level 4
int TONE_CDMA_LOW_L

TONE_CDMA_LOW_L音:{1300Hz 25ms,1450Hz 25ms} 40次,4000ms OFF,重复....

也可以看看:

常量值:55(0x00000037)

TONE_CDMA_LOW_PBX_L

Added in API level 4
int TONE_CDMA_LOW_PBX_L

CDMA低级集团电话L:{1300Hz 25ms,1450Hz 25ms} 20次,2000ms关闭,REPEAT ....

也可以看看:

常量值:73(0x00000049)

TONE_CDMA_LOW_PBX_SLS

Added in API level 4
int TONE_CDMA_LOW_PBX_SLS

CDMA高级PBX SLS音频:{1300Hz 25ms,1450Hz 25ms} 8次200ms关闭,{1300Hz 25ms,1450Hz 25ms} 16次,200ms关闭,{1300Hz 25ms,1450Hz 25ms} 8次,1000ms关闭,REPEAT ....

也可以看看:

常量值:82(0x00000052)

TONE_CDMA_LOW_PBX_SS

Added in API level 4
int TONE_CDMA_LOW_PBX_SS

CDMA低级PBX SS音:{1300Hz 25ms,1450Hz 25ms} 8次200ms OFF,{1300Hz 25ms 1450Hz 25ms} 8次,2000ms OFF,REPEAT ....

也可以看看:

常量值:76(0x0000004c)

TONE_CDMA_LOW_PBX_SSL

Added in API level 4
int TONE_CDMA_LOW_PBX_SSL

CDMA低级PBX SSL音:{1300Hz 25ms,1450Hz 25ms} 8次200ms关,{1300Hz 25ms,1450Hz 25ms} 8次,200ms关,{1300Hz 25ms,1450Hz 25ms} 16次,1000ms关,REPEAT ....

也可以看看:

常量值:79(0x0000004f)

TONE_CDMA_LOW_PBX_S_X4

Added in API level 4
int TONE_CDMA_LOW_PBX_S_X4

CDMA低PBX X S4音:{1300Hz 25ms 1450Hz 25ms} 8次,200ms关,{1300Hz 25ms 1450Hz 25ms} 8次,200ms关,{1300Hz 25ms 1450Hz 25ms} 8次,200ms关,{1300Hz 25ms 1450Hz 25ms} 8次,800ms关闭,REPEAT ...

也可以看看:

常量值:85(0x00000055)

TONE_CDMA_LOW_SLS

Added in API level 4
int TONE_CDMA_LOW_SLS

CDMA低SLS音:{1300Hz 25ms,1450Hz 25ms} 10次,500ms关,{1300Hz 25ms,1450Hz 25ms} 20次,500ms关,{1300Hz 25ms,1450Hz 25ms} 10次,3000ms关,REPEAT

也可以看看:

常量值:67(0x00000043)

TONE_CDMA_LOW_SS

Added in API level 4
int TONE_CDMA_LOW_SS

CDMA低SS音:{1300z 25ms,1450Hz 25ms}重复16次,400ms关,重复....

也可以看看:

常量值:58(0x0000003a)

TONE_CDMA_LOW_SSL

Added in API level 4
int TONE_CDMA_LOW_SSL

CDMA低SSL音:{1300Hz 25ms,1450Hz 25ms} 8次,200ms关,{1300Hz 25ms,1450Hz 25ms}重复8次,200ms关,{1300Hz 25ms,1450Hz 25ms}重复16次,4000ms关,重复...

也可以看看:

常量值:61(0x0000003d)

TONE_CDMA_LOW_SS_2

Added in API level 4
int TONE_CDMA_LOW_SS_2

CDMA低SS2音:{1300Hz 25ms,1450Hz 25ms} 20次,1000ms关,{1300Hz 25ms,1450Hz 25ms} 20次,3000ms关,重复....

也可以看看:

常量值:64(0x00000040)

TONE_CDMA_LOW_S_X4

Added in API level 4
int TONE_CDMA_LOW_S_X4

CDMA低S X4音:{2600Hz 25ms,2900Hz 25ms} 10次,500ms关,{2600Hz 25ms,2900Hz 25ms} 10次,500ms关,{2600Hz 25ms,2900Hz 25ms} 10次,500ms关,{2600Hz 25ms,2900Hz 25ms} 10次,2500ms关,REPEAT ....

也可以看看:

常量值:70(0x00000046)

TONE_CDMA_MED_L

Added in API level 4
int TONE_CDMA_MED_L

TONE_CDMA_MED_L音:{2600Hz 25ms,2900Hz 25ms} 40次4000ms OFF,重复....

也可以看看:

常数值:54(0x00000036)

TONE_CDMA_MED_PBX_L

Added in API level 4
int TONE_CDMA_MED_PBX_L

CDMA MED PBX L:{2600Hz 25ms,2900Hz 25ms} 20次,2000ms OFF,REPEAT ....

也可以看看:

常量值:72(0x00000048)

TONE_CDMA_MED_PBX_SLS

Added in API level 4
int TONE_CDMA_MED_PBX_SLS

CDMA高级PBX SLS音频:{2600Hz 25ms,2900Hz 25ms} 8次200ms关闭,{2600Hz 25ms,2900Hz 25ms} 16次,200ms关闭,{2600Hz 25ms,2900Hz 25ms} 8次,1000ms关闭,REPEAT ....

也可以看看:

常量值:81(0x00000051)

TONE_CDMA_MED_PBX_SS

Added in API level 4
int TONE_CDMA_MED_PBX_SS

CDMA MED PBX SS音:{2600Hz 25ms,2900Hz 25ms} 8次200ms OFF,{2600Hz 25ms 2900Hz 25ms} 8次,2000ms OFF,REPEAT ....

也可以看看:

常数值:75(0x0000004b)

TONE_CDMA_MED_PBX_SSL

Added in API level 4
int TONE_CDMA_MED_PBX_SSL

CDMA MED PBX SSL音:{2600Hz 25ms,2900Hz 25ms} 8次200ms关,{2600Hz 25ms,2900Hz 25ms} 8次,200ms关,{2600Hz 25ms,2900Hz 25ms} 16次,1000ms关,REPEAT ....

也可以看看:

常量值:78(0x0000004e)

TONE_CDMA_MED_PBX_S_X4

Added in API level 4
int TONE_CDMA_MED_PBX_S_X4

CDMA MED PBX X S4音:{2600Hz 25ms 2900Hz 25ms} 8次,200ms关,{2600Hz 25ms 2900Hz 25ms} 8次,200ms关,{2600Hz 25ms 2900Hz 25ms} 8次,200ms关,{2600Hz 25ms 2900Hz 25ms} 8次,800ms关闭,REPEAT ...

也可以看看:

常量值:84(0x00000054)

TONE_CDMA_MED_SLS

Added in API level 4
int TONE_CDMA_MED_SLS

CDMA MED SLS音:{2600Hz 25ms,2900Hz 25ms} 10次,500ms关,{2600Hz 25ms,2900Hz 25ms} 20次,500ms关,{2600Hz 25ms,2900Hz 25ms} 10次,3000ms关,REPEAT

也可以看看:

常量值:66(0x00000042)

TONE_CDMA_MED_SS

Added in API level 4
int TONE_CDMA_MED_SS

CDMA MED SS音调:{2600Hz 25ms,2900Hz 25ms}重复16次,关闭400ms,重复....

也可以看看:

常量值:57(0x00000039)

TONE_CDMA_MED_SSL

Added in API level 4
int TONE_CDMA_MED_SSL

CDMA MED音调:{2600Hz 25ms,2900Hz 25ms} 8次,200ms关,{2600Hz 25ms,2900Hz 25ms}重复8次,200ms关,{2600Hz 25ms,2900Hz 25ms}重复16次,4000ms关闭,重复...

也可以看看:

常量值:60(0x0000003c)

TONE_CDMA_MED_SS_2

Added in API level 4
int TONE_CDMA_MED_SS_2

CDMA MED SS2音:{2600Hz 25ms,2900Hz 25ms} 20次,1000ms关,{2600Hz 25ms,2900Hz 25ms} 20次,3000ms关,重复....

也可以看看:

常量值:63(0x0000003f)

TONE_CDMA_MED_S_X4

Added in API level 4
int TONE_CDMA_MED_S_X4

CDMA MED S X4音:{2600Hz 25ms,2900Hz 25ms} 10次,500ms关,{2600Hz 25ms,2900Hz 25ms} 10次,500ms关,{2600Hz 25ms,2900Hz 25ms} 10次,500ms关,{2600Hz 25ms,2900Hz 25ms} 10次,2500ms关,REPEAT ....

也可以看看:

常量值:69(0x00000045)

TONE_CDMA_NETWORK_BUSY

Added in API level 4
int TONE_CDMA_NETWORK_BUSY

CDMA网络忙音:480Hz + 620Hz开启500ms,持续500ms关闭

也可以看看:

常量值:40(0x00000028)

TONE_CDMA_NETWORK_BUSY_ONE_SHOT

Added in API level 4
int TONE_CDMA_NETWORK_BUSY_ONE_SHOT

CDMA_NETWORK_BUSY_ONE_SHOT音调:425Hz开启500ms,关闭500ms。

也可以看看:

常量值:96(0x00000060)

TONE_CDMA_NETWORK_CALLWAITING

Added in API level 4
int TONE_CDMA_NETWORK_CALLWAITING

CDMA网络呼叫等待音:440Hz 300ms开

也可以看看:

常量值:43(0x0000002b)

TONE_CDMA_NETWORK_USA_RINGBACK

Added in API level 4
int TONE_CDMA_NETWORK_USA_RINGBACK

CDMA美国回铃:440Hz + 480Hz 2s ON,4000 OFF ...

也可以看看:

常量值:35(0x00000023)

TONE_CDMA_ONE_MIN_BEEP

Added in API level 4
int TONE_CDMA_ONE_MIN_BEEP

CDMA一分钟哔声:1150Hz + 770Hz 400ms开启

也可以看看:

常数值:88(0x00000058)

TONE_CDMA_PIP

Added in API level 4
int TONE_CDMA_PIP

CDMA PIP音频:480Hz 100ms开启,100ms关闭重复4次

也可以看看:

常量值:44(0x0000002c)

TONE_CDMA_PRESSHOLDKEY_LITE

Added in API level 4
int TONE_CDMA_PRESSHOLDKEY_LITE

CDMA PRESSHOLDKEY LITE音频:587Hz 375ms ON,1175Hz 125ms ON

也可以看看:

常量值:90(0x0000005a)

TONE_CDMA_REORDER

Added in API level 4
int TONE_CDMA_REORDER

CDMA重拨音:480Hz + 620Hz开启250ms,关闭...

也可以看看:

常量值:38(0x00000026)

TONE_CDMA_SIGNAL_OFF

Added in API level 4
int TONE_CDMA_SIGNAL_OFF

CDMA_SIGNAL_OFF - 静音

也可以看看:

常量值:98(0x00000062)

TONE_CDMA_SOFT_ERROR_LITE

Added in API level 4
int TONE_CDMA_SOFT_ERROR_LITE

CDMA SOFT ERROR LITE音频:1047Hz 125ms开启,370Hz 125ms

也可以看看:

常量值:94(0x0000005e)

TONE_DTMF_0

Added in API level 1
int TONE_DTMF_0

键0的DTMF音:1336Hz,941Hz,连续

也可以看看:

常量值:0(0x00000000)

TONE_DTMF_1

Added in API level 1
int TONE_DTMF_1

键1的DTMF音:1209Hz,697Hz,连续

也可以看看:

常数值:1(0x00000001)

TONE_DTMF_2

Added in API level 1
int TONE_DTMF_2

键2的DTMF音:1336Hz,697Hz,连续

也可以看看:

常量值:2(0x00000002)

TONE_DTMF_3

Added in API level 1
int TONE_DTMF_3

键3的DTMF音:1477Hz,697Hz,连续

也可以看看:

常量值:3(0x00000003)

TONE_DTMF_4

Added in API level 1
int TONE_DTMF_4

键4的DTMF音:1209Hz,770Hz,连续

也可以看看:

常量值:4(0x00000004)

TONE_DTMF_5

Added in API level 1
int TONE_DTMF_5

键5的DTMF音:1336Hz,770Hz,连续

也可以看看:

常量值:5(0x00000005)

TONE_DTMF_6

Added in API level 1
int TONE_DTMF_6

键6的DTMF音:1477Hz,770Hz,连续

也可以看看:

常数值:6(0x00000006)

TONE_DTMF_7

Added in API level 1
int TONE_DTMF_7

键7的DTMF音调:1209Hz,852Hz,连续

也可以看看:

常量值:7(0x00000007)

TONE_DTMF_8

Added in API level 1
int TONE_DTMF_8

键8的DTMF音:1336Hz,852Hz,连续

也可以看看:

常量值:8(0x00000008)

TONE_DTMF_9

Added in API level 1
int TONE_DTMF_9

键9的DTMF音调:1477Hz,852Hz,连续

也可以看看:

常量值:9(0x00000009)

TONE_DTMF_A

Added in API level 1
int TONE_DTMF_A

键A的DTMF音:1633Hz,697Hz,连续

也可以看看:

常量值:12(0x0000000c)

TONE_DTMF_B

Added in API level 1
int TONE_DTMF_B

键B的DTMF音:1633Hz,770Hz,连续

也可以看看:

常量值:13(0x0000000d)

TONE_DTMF_C

Added in API level 1
int TONE_DTMF_C

键C的DTMF音:1633Hz,852Hz,连续

也可以看看:

常量值:14(0x0000000e)

TONE_DTMF_D

Added in API level 1
int TONE_DTMF_D

键D的DTMF音:1633Hz,941Hz,连续

也可以看看:

常量值:15(0x0000000f)

TONE_DTMF_P

Added in API level 1
int TONE_DTMF_P

键#的DTMF音:1477Hz,941Hz,连续

也可以看看:

常量值:11(0x0000000b)

TONE_DTMF_S

Added in API level 1
int TONE_DTMF_S

键*的DTMF音调:1209Hz,941Hz,连续

也可以看看:

常量值:10(0x0000000a)

TONE_PROP_ACK

Added in API level 1
int TONE_PROP_ACK

专有声调,正确确认:1200Hz,100ms开启,100ms关闭2个脉冲串

也可以看看:

常量值:25(0x00000019)

TONE_PROP_BEEP

Added in API level 1
int TONE_PROP_BEEP

专有声调,一般蜂鸣声:400Hz + 1200Hz,35ms开启

也可以看看:

常量值:24(0x00000018)

TONE_PROP_BEEP2

Added in API level 1
int TONE_PROP_BEEP2

专有音调,一般双重哔声:两次400Hz + 1200Hz,35ms开启,200ms关闭,35ms开启

也可以看看:

常量值:28(0x0000001c)

TONE_PROP_NACK

Added in API level 1
int TONE_PROP_NACK

专有声调,否定确认:300Hz + 400Hz + 500Hz,开启400ms

也可以看看:

常量值:26(0x0000001a)

TONE_PROP_PROMPT

Added in API level 1
int TONE_PROP_PROMPT

专有声调,提示音:400Hz + 1200Hz,200ms ON

也可以看看:

常量值:27(0x0000001b)

TONE_SUP_BUSY

Added in API level 1
int TONE_SUP_BUSY

呼叫监控音,忙:CEPT:425Hz,开500ms,500ms关...... ANSI(IS-95):480Hz + 620Hz,500ms开,500ms关...日本:400Hz,500ms开,500ms关...

也可以看看:

常量值:17(0x00000011)

TONE_SUP_CALL_WAITING

Added in API level 1
int TONE_SUP_CALL_WAITING

呼叫监控音,呼叫等待:CEPT,JAPAN:425Hz,200ms ON,600ms OFF,200ms ON,3s OFF ... ANSI(IS-95):440 Hz,300 ms ON,9.7 s OFF,(100 ms ON, 100 ms OFF,100 ms ON,9.7秒OFF ...)

也可以看看:

常量值:22(0x00000016)

TONE_SUP_CONFIRM

Added in API level 4
int TONE_SUP_CONFIRM

呼叫监听音(IS-95),确认音:在100毫秒开启,100毫秒关闭周期内将350赫兹音调添加到440赫兹音调中重复3次

也可以看看:

常量值:32(0x00000020)

TONE_SUP_CONGESTION

Added in API level 1
int TONE_SUP_CONGESTION

呼叫监控音,拥塞:CEPT,JAPAN:425Hz,200ms ON,200ms OFF ... ANSI(IS-95):480Hz + 620Hz,250ms ON,250ms OFF ...

也可以看看:

常量值:18(0x00000012)

TONE_SUP_CONGESTION_ABBREV

Added in API level 4
int TONE_SUP_CONGESTION_ABBREV

呼叫监控音(IS-95),简称拥塞:拥塞音限于4秒

也可以看看:

常量值:31(0x0000001f)

TONE_SUP_DIAL

Added in API level 1
int TONE_SUP_DIAL

呼叫监听音,拨号音:CEPT:425Hz,连续ANSI(IS-95):350Hz + 440Hz,连续JAPAN:400Hz,连续

也可以看看:

常量值:16(0x00000010)

TONE_SUP_ERROR

Added in API level 1
int TONE_SUP_ERROR

通话管理音,错误/特殊信息:950Hz + 1400Hz + 1800Hz,开启330ms,关闭1秒...

也可以看看:

常量值:21(0x00000015)

TONE_SUP_INTERCEPT

Added in API level 4
int TONE_SUP_INTERCEPT

呼叫监听音(IS-95),监听音:交替440赫兹和620赫兹音,每次250毫秒

也可以看看:

常量值:29(0x0000001d)

TONE_SUP_INTERCEPT_ABBREV

Added in API level 4
int TONE_SUP_INTERCEPT_ABBREV

呼叫管理音(IS-95),缩略截听:截听音限制为4秒

也可以看看:

常量值:30(0x0000001e)

TONE_SUP_PIP

Added in API level 4
int TONE_SUP_PIP

呼叫监控音(IS-95),点音:480 Hz音调的四个脉冲(0.1 s开启,0.1 s关闭)。

也可以看看:

常量值:33(0x00000021)

TONE_SUP_RADIO_ACK

Added in API level 1
int TONE_SUP_RADIO_ACK

呼叫管理音,无线电路径确认:CEPT,ANSI:425Hz,200ms ON JAPAN:400Hz,1s ON,2s OFF ...

也可以看看:

常量值:19(0x00000013)

TONE_SUP_RADIO_NOTAVAIL

Added in API level 1
int TONE_SUP_RADIO_NOTAVAIL

呼叫监控音,无线电路径不可用:425Hz,200ms ON,200 OFF 3脉冲

也可以看看:

常量值:20(0x00000014)

TONE_SUP_RINGTONE

Added in API level 1
int TONE_SUP_RINGTONE

呼叫监听铃声,铃声:CEPT,JAPAN:425Hz,1s开,4s关... ANSI(IS-95):440Hz + 480Hz,2s开,4s关...

也可以看看:

常量值:23(0x00000017)

Public constructors

ToneGenerator

Added in API level 1
ToneGenerator (int streamType, 
                int volume)

ToneGenerator类构造器指定输出流类型和音量。

Parameters
streamType int: The streame type used for tone playback (e.g. STREAM_MUSIC).
volume int: The volume of the tone, given in percentage of maximum volume (from 0-100).

Public methods

getAudioSessionId

Added in API level 16
int getAudioSessionId ()

返回音频会话ID。

Returns
int the ID of the audio session this ToneGenerator belongs to or 0 if an error occured.

release

Added in API level 1
void release ()

释放与此ToneGenerator对象关联的资源。 当您完成使用ToneGenerator时,调用此方法是一种很好的做法。

startTone

Added in API level 5
boolean startTone (int toneType, 
                int durationMs)

此方法在指定的持续时间内开始播放指定类型的音调。

Parameters
toneType int: The type of tone generated @see startTone(int).
durationMs int: The tone duration in milliseconds. If the tone is limited in time by definition, the actual duration will be the minimum of durationMs and the defined tone duration. Setting durationMs to -1, is equivalent to calling startTone(int).
Returns
boolean

startTone

Added in API level 1
boolean startTone (int toneType)

此方法开始播放指定类型的音色。 一次只能播放一种音调:如果在调用此方法时正在播放音调,则会停止该音调并将其替换为所请求的音调。

Parameters
toneType int: The type of tone generated chosen from the following list:
Returns
boolean

也可以看看:

stopTone

Added in API level 1
void stopTone ()

此方法可停止当前正在播放的音调。

也可以看看:

Protected methods

finalize

Added in API level 1
void finalize ()

当垃圾收集确定没有更多对该对象的引用时,由对象上的垃圾回收器调用。 子类重写finalize方法来处置系统资源或执行其他清理。

finalize的总体合同是,如果当Java TM虚拟机已经确定不再有任何途径可以通过任何还没有死亡的线程访问该对象时,除了作为动作的结果之外取决于某些其他可以完成的对象或类别的最终定稿。 finalize方法可以采取任何行动,包括再制作该对象提供给其他线程; 然而, finalize的通常目的是在对象被不可撤销地丢弃之前执行清除操作。 例如,表示输入/输出连接的对象的finalize方法可能会执行显式I / O事务,以在永久丢弃该对象之前中断连接。

finalize类的finalize方法Object执行特殊操作; 它只是正常返回。 Object子类可能会覆盖此定义。

Java编程语言不保证哪个线程将为任何给定的对象调用finalize方法。 但是,保证调用finalize的线程在调用finalize时不会保留任何用户可见的同步锁。 如果finalize方法引发未捕获的异常,则忽略该异常,并终止该对象的终止。

在为某个对象调用 finalize方法之后,在Java虚拟机再次确定不再有任何方法可以通过尚未死亡的任何线程访问此对象,包括可能的操作通过准备完成的其他对象或类别,此时该对象可能被丢弃。

对于任何给定的对象,Java虚拟机永远不会多次调用 finalize方法。

finalize方法引发的任何异常 finalize导致此对象的终止被暂停,但会被忽略。

Hooray!