Package io.rong.imkit.manager

## Class AudioRecordManager

- All Implemented Interfaces:

      public class AudioRecordManager

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---
    `public enum` | `AudioRecordManager.SamplingRate` | 语音消息采样率

  - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---

  - ### Enum Constant Summary

    Enum Constants
    Enum Constant | Description
    --- | ---

  - ### Method Summary

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

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

  - ### Method Detail

    - #### getInstance

           static AudioRecordManager getInstance()

    - #### handleMessage

           final boolean handleMessage(Message msg)

    - #### getMaxVoiceDuration

           int getMaxVoiceDuration()

    - #### setMaxVoiceDuration

           void setMaxVoiceDuration(int maxVoiceDuration)

      协议栈默认支持消息大小为 128K, 超过这个限制有可能导致 socket 断开。 普通语音消息超过 60s 时，会导致消息体大小超过限制，从而导致连接断开。 为了避免以上问题，对外统一废弃此接口。

      Parameters:
        `maxVoiceDuration` - 最大语音时长。

    - #### startRecord

           void startRecord(View rootView, ConversationIdentifier conversationIdentifier)

    - #### willCancelRecord

           void willCancelRecord()

    - #### continueRecord

           void continueRecord()

    - #### stopRecord

           void stopRecord()

    - #### destroyRecord

           void destroyRecord()

    - #### getSamplingRate

           int getSamplingRate()

      语音消息采样率

      Returns:

        当前设置的语音采样率

    - #### setSamplingRate

           void setSamplingRate(AudioRecordManager.SamplingRate sampleRate)

      设置语音消息采样率

      Parameters:
        `sampleRate` - 消息采样率SamplingRate