Public 属性

String audioInputDevice = INPUT_VOICE_COMMUNICATION
 
String audioOutputDevice = OUTPUT_VOICE_CALL
 
int audioInputSamplingRate = 0
 
int audioOutputSamplingRate = 0
 
int audioInputChannelNumber = 0
 
int audioOutputChannelNumber = 0
 
int androidAudioMode = AudioManager.MODE_IN_COMMUNICATION
 
boolean autoStartAudioOutputDevice = true
 
boolean autoStartAudioInputDevice = true
 
int aecMode = JCParam.AudioDeal.AEC_ON
 
int agcMode = JCParam.AudioDeal.AGC_ON
 

静态 Public 属性

static final String OUTPUT_VOICE_CALL = "STREAM_VOICE_CALL"
 
static final String OUTPUT_SYSTEM = "STREAM_SYSTEM"
 
static final String OUTPUT_RING = "STREAM_RING"
 
static final String OUTPUT_MUSIC = "STREAM_MUSIC"
 
static final String OUTPUT_ALARM = "STREAM_ALARM"
 
static final String OUTPUT_NOTIFICATION = "STREAM_NOTIFICATION"
 
static final String OUTPUT_DTMF = "STREAM_DTMF"
 
static final String INPUT_DEFAULT = "DEFAULT"
 
static final String INPUT_MIC = "MIC"
 
static final String INPUT_VOICE_UPLINK = "VOICE_UPLINK"
 
static final String INPUT_VOICE_DOWNLINK = "VOICE_DOWNLINK"
 
static final String INPUT_VOICE_CALL = "VOICE_CALL"
 
static final String INPUT_CAMCORDER = "CAMCORDER"
 
static final String INPUT_VOICE_RECOGNITION = "VOICE_RECOGNITION"
 
static final String INPUT_VOICE_COMMUNICATION = "VOICE_COMMUNICATION"
 
static final int AGC_ON = ZmfAudio.AGC_ON
 
static final int AGC_OFF = ZmfAudio.AGC_OFF
 
static final int AGC_AUTO = ZmfAudio.AGC_AUTO
 
static final int AEC_ON = ZmfAudio.AEC_ON
 
static final int AEC_OFF = ZmfAudio.AEC_OFF
 
static final int AEC_AUTO = ZmfAudio.AEC_AUTO
 

详细描述

音频参数

类成员变量说明

◆ OUTPUT_VOICE_CALL

final String com.juphoon.cloud.JCMediaDevice.JCMediaDeviceAudioParam.OUTPUT_VOICE_CALL = "STREAM_VOICE_CALL"
static

用于电话

◆ OUTPUT_SYSTEM

final String com.juphoon.cloud.JCMediaDevice.JCMediaDeviceAudioParam.OUTPUT_SYSTEM = "STREAM_SYSTEM"
static

用于系统声音

◆ OUTPUT_RING

final String com.juphoon.cloud.JCMediaDevice.JCMediaDeviceAudioParam.OUTPUT_RING = "STREAM_RING"
static

用于电话铃声

◆ OUTPUT_MUSIC

final String com.juphoon.cloud.JCMediaDevice.JCMediaDeviceAudioParam.OUTPUT_MUSIC = "STREAM_MUSIC"
static

用于音乐播放

◆ OUTPUT_ALARM

final String com.juphoon.cloud.JCMediaDevice.JCMediaDeviceAudioParam.OUTPUT_ALARM = "STREAM_ALARM"
static

用于警报

◆ OUTPUT_NOTIFICATION

final String com.juphoon.cloud.JCMediaDevice.JCMediaDeviceAudioParam.OUTPUT_NOTIFICATION = "STREAM_NOTIFICATION"
static

用于标识通知

◆ OUTPUT_DTMF

final String com.juphoon.cloud.JCMediaDevice.JCMediaDeviceAudioParam.OUTPUT_DTMF = "STREAM_DTMF"
static

用于DTMF音调

◆ INPUT_DEFAULT

final String com.juphoon.cloud.JCMediaDevice.JCMediaDeviceAudioParam.INPUT_DEFAULT = "DEFAULT"
static

默认音频源

◆ INPUT_MIC

final String com.juphoon.cloud.JCMediaDevice.JCMediaDeviceAudioParam.INPUT_MIC = "MIC"
static

麦克风音频源

◆ INPUT_VOICE_UPLINK

final String com.juphoon.cloud.JCMediaDevice.JCMediaDeviceAudioParam.INPUT_VOICE_UPLINK = "VOICE_UPLINK"
static

语音呼叫上行链路(Tx)音频源

◆ INPUT_VOICE_DOWNLINK

final String com.juphoon.cloud.JCMediaDevice.JCMediaDeviceAudioParam.INPUT_VOICE_DOWNLINK = "VOICE_DOWNLINK"
static

语音呼叫下行(Rx)音频源

◆ INPUT_VOICE_CALL

final String com.juphoon.cloud.JCMediaDevice.JCMediaDeviceAudioParam.INPUT_VOICE_CALL = "VOICE_CALL"
static

语音通话上行加下行音频源

◆ INPUT_CAMCORDER

final String com.juphoon.cloud.JCMediaDevice.JCMediaDeviceAudioParam.INPUT_CAMCORDER = "CAMCORDER"
static

调整了用于视频录制的麦克风音频源,方向相同作为相机(如果有)

◆ INPUT_VOICE_RECOGNITION

final String com.juphoon.cloud.JCMediaDevice.JCMediaDeviceAudioParam.INPUT_VOICE_RECOGNITION = "VOICE_RECOGNITION"
static

麦克风音频源经过调整,可进行语音识别

◆ INPUT_VOICE_COMMUNICATION

final String com.juphoon.cloud.JCMediaDevice.JCMediaDeviceAudioParam.INPUT_VOICE_COMMUNICATION = "VOICE_COMMUNICATION"
static

已针对语音通信(如VoIP)调整了麦克风音频源。例如,如果可供使用的话,它将使用回声消除或自动增益控制

◆ AGC_ON

final int com.juphoon.cloud.JCMediaDevice.JCMediaDeviceAudioParam.AGC_ON = ZmfAudio.AGC_ON
static

硬件AGC 开启 -默认状态

◆ AGC_OFF

final int com.juphoon.cloud.JCMediaDevice.JCMediaDeviceAudioParam.AGC_OFF = ZmfAudio.AGC_OFF
static

硬件AGC 关闭

◆ AGC_AUTO

final int com.juphoon.cloud.JCMediaDevice.JCMediaDeviceAudioParam.AGC_AUTO = ZmfAudio.AGC_AUTO
static

硬件AGC 自动

◆ AEC_ON

final int com.juphoon.cloud.JCMediaDevice.JCMediaDeviceAudioParam.AEC_ON = ZmfAudio.AEC_ON
static

硬件AEC 开启 -默认状态

◆ AEC_OFF

final int com.juphoon.cloud.JCMediaDevice.JCMediaDeviceAudioParam.AEC_OFF = ZmfAudio.AEC_OFF
static

硬件AEC 关闭

◆ AEC_AUTO

final int com.juphoon.cloud.JCMediaDevice.JCMediaDeviceAudioParam.AEC_AUTO = ZmfAudio.AEC_AUTO
static

硬件AEC 自动

◆ audioInputDevice

String com.juphoon.cloud.JCMediaDevice.JCMediaDeviceAudioParam.audioInputDevice = INPUT_VOICE_COMMUNICATION

音频输入设备

默认值为 INPUT_VOICE_COMMUNICATION 修改前需要设置useInternalAudioDeviceLogic 为false, 否则无法生效

◆ audioOutputDevice

String com.juphoon.cloud.JCMediaDevice.JCMediaDeviceAudioParam.audioOutputDevice = OUTPUT_VOICE_CALL

音频输出设备

默认值为 OUTPUT_VOICE_CALL

◆ audioInputSamplingRate

int com.juphoon.cloud.JCMediaDevice.JCMediaDeviceAudioParam.audioInputSamplingRate = 0

音频输入采样率

默认值为 0,表示自动选择,手表等设备可以设置为8000
不清楚如何选择音频采样率可不设置此参数,SDK将自动选择合适的音频采样率

◆ audioOutputSamplingRate

int com.juphoon.cloud.JCMediaDevice.JCMediaDeviceAudioParam.audioOutputSamplingRate = 0

音频输出采样率

默认值为 0,表示自动选择,手表等设备可以设置为8000
不清楚如何选择音频采样率可不设置此参数,SDK将自动选择合适的音频采样率

◆ audioInputChannelNumber

int com.juphoon.cloud.JCMediaDevice.JCMediaDeviceAudioParam.audioInputChannelNumber = 0

音频输入通道数量

0 和 1 表示单通道,>= 2 表示双通道,默认值为0

◆ audioOutputChannelNumber

int com.juphoon.cloud.JCMediaDevice.JCMediaDeviceAudioParam.audioOutputChannelNumber = 0

音频输出通道数量

0 和 1 表示单通道,>= 2 表示双通道,默认值为0

◆ androidAudioMode

int com.juphoon.cloud.JCMediaDevice.JCMediaDeviceAudioParam.androidAudioMode = AudioManager.MODE_IN_COMMUNICATION

Android 声音模式

默认为 AudioManager.MODE_IN_COMMUNICATION

◆ autoStartAudioOutputDevice

boolean com.juphoon.cloud.JCMediaDevice.JCMediaDeviceAudioParam.autoStartAudioOutputDevice = true

是否自动打开音频输出设备

建议在一对一通话开始前或者加入频道前进行设置,默认值为 true,表示自动打开

  • true: 当一对一通话状态为连接中时或者自己加入频道成功时,SDK会自动打开音频输出设备
  • false: SDK 不会自动打开音频输出设备,建议在一对一通话状态为连接中时或者加入频道成功后,在子线程不断的调用 getAudioOutputData 方法获取音频输出数据

◆ autoStartAudioInputDevice

boolean com.juphoon.cloud.JCMediaDevice.JCMediaDeviceAudioParam.autoStartAudioInputDevice = true

是否自动打开音频输入设备

建议在一对一通话开始前或者加入频道前进行设置,默认值为 true,表示自动打开

  • true: 当一对一通话状态为连接中时或者自己加入频道成功时,SDK会自动打开音频输入设备
  • false: SDK 不会自动打开音频输入设备,建议在一对一通话状态为连接中时或者加入频道成功后,在子线程不断的调用 inputCustomAudioData 方法传入音频数据

◆ aecMode

int com.juphoon.cloud.JCMediaDevice.JCMediaDeviceAudioParam.aecMode = JCParam.AudioDeal.AEC_ON

硬件AEC(回声消除)的开启状态

默认是打开状态

◆ agcMode

int com.juphoon.cloud.JCMediaDevice.JCMediaDeviceAudioParam.agcMode = JCParam.AudioDeal.AGC_ON

硬件AGC(自动增益)的开启状态

默认是打开状态


该类的文档由以下文件生成:
  • cloud/src/main/common/com/juphoon/cloud/JCMediaDevice.java
最后更新时间: 2024/8/7 17:15:00