# AudioRecordManager

public class AudioRecordManager

## Types

SamplingRate
Link copied to clipboard
public enum SamplingRate
语音消息采样率

## Functions

continueRecord
Link copied to clipboard
public void continueRecord()
destroyRecord
Link copied to clipboard
public void destroyRecord()
getInstance
Link copied to clipboard
public static AudioRecordManager getInstance()
getMaxVoiceDuration
Link copied to clipboard
public int getMaxVoiceDuration()
getSamplingRate
Link copied to clipboard
public int getSamplingRate()
语音消息采样率
handleMessage
Link copied to clipboard
public final boolean handleMessage(Message msg)
setMaxVoiceDuration
Link copied to clipboard
public void setMaxVoiceDuration(int maxVoiceDuration)
协议栈默认支持消息大小为 128K, 超过这个限制有可能导致 socket 断开。 普通语音消息超过 60s 时，会导致消息体大小超过限制，从而导致连接断开。 为了避免以上问题，对外统一废弃此接口。
setSamplingRate
Link copied to clipboard
public void setSamplingRate(AudioRecordManager.SamplingRate sampleRate)
设置语音消息采样率
startRecord
Link copied to clipboard
public void startRecord(View rootView, ConversationIdentifier conversationIdentifier)
stopRecord
Link copied to clipboard
public void stopRecord()
willCancelRecord
Link copied to clipboard
public void willCancelRecord()