类 | |
| 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) |
用于识别本地语音文件的音频参数。
| com.hyphenate.chat.EMAudioParams.EMAudioParams | ( | ) |
构造函数。
| int com.hyphenate.chat.EMAudioParams.getBitsPerSample | ( | ) |
获取语音文件的采样位深(单位:bit),例如 16。
| int com.hyphenate.chat.EMAudioParams.getChannels | ( | ) |
获取语音文件的声道数,例如,1 表示单声道。
| AudioFormat com.hyphenate.chat.EMAudioParams.getFormat | ( | ) |
获取语音文件的格式。
| int com.hyphenate.chat.EMAudioParams.getSampleRate | ( | ) |
获取语音文件的采样率(单位:Hz)。
| void com.hyphenate.chat.EMAudioParams.setBitsPerSample | ( | int | bitsPerSample | ) |
设置语音文件的采样位深(单位:bit)。
| bitsPerSample | 语音文件的采样位深。 |
| void com.hyphenate.chat.EMAudioParams.setChannels | ( | int | channels | ) |
设置语音文件的声道数。
| channels | 语音文件的声道数。 |
| void com.hyphenate.chat.EMAudioParams.setFormat | ( | AudioFormat | format | ) |
设置语音文件的格式。
| format | 语音文件的格式。 |
| void com.hyphenate.chat.EMAudioParams.setSampleRate | ( | int | sampleRate | ) |
设置语音文件的采样率(单位:Hz)。
| sampleRate | 语音文件的采样率。 |