hyphenate_SDK4.0 4.21.0
hyphenate java IM SDK
载入中...
搜索中...
未找到
| Public 成员函数 | 所有成员列表
com.hyphenate.chat.EMAudioParams类 参考

继承自 com.hyphenate.chat.EMBase< T > .

enum  AudioFormat
 

Public 成员函数

 EMAudioParams ()
 
AudioFormat getFormat ()
 
void setFormat (AudioFormat format)
 
int getSampleRate ()
 
void setSampleRate (int sampleRate)
 
int getBitsPerSample ()
 
void setBitsPerSample (int bitsPerSample)
 
int getChannels ()
 
void setChannels (int channels)
 

详细描述

用于识别本地语音文件的音频参数。

构造及析构函数说明

◆ EMAudioParams()

com.hyphenate.chat.EMAudioParams.EMAudioParams ( )

构造函数。

成员函数说明

◆ getBitsPerSample()

int com.hyphenate.chat.EMAudioParams.getBitsPerSample ( )

获取语音文件的采样位深(单位:bit),例如 16。

返回
语音文件的采样位深。

◆ getChannels()

int com.hyphenate.chat.EMAudioParams.getChannels ( )

获取语音文件的声道数,例如,1 表示单声道。

返回
语音文件的声道数

◆ getFormat()

AudioFormat com.hyphenate.chat.EMAudioParams.getFormat ( )

获取语音文件的格式。

返回
语音文件的格式。

◆ getSampleRate()

int com.hyphenate.chat.EMAudioParams.getSampleRate ( )

获取语音文件的采样率(单位:Hz)。

返回
语音文件的采样率。

◆ setBitsPerSample()

void com.hyphenate.chat.EMAudioParams.setBitsPerSample ( int bitsPerSample)

设置语音文件的采样位深(单位:bit)。

参数
bitsPerSample语音文件的采样位深。

◆ setChannels()

void com.hyphenate.chat.EMAudioParams.setChannels ( int channels)

设置语音文件的声道数。

参数
channels语音文件的声道数。

◆ setFormat()

void com.hyphenate.chat.EMAudioParams.setFormat ( AudioFormat format)

设置语音文件的格式。

参数
format语音文件的格式。

◆ setSampleRate()

void com.hyphenate.chat.EMAudioParams.setSampleRate ( int sampleRate)

设置语音文件的采样率(单位:Hz)。

参数
sampleRate语音文件的采样率。

该类的文档由以下文件生成: