io.agora.rtc

## Class AgoraAudioDeviceManager

- java.lang.Object
- - io.agora.rtc.AgoraAudioDeviceManager

-     public class AgoraAudioDeviceManager
      extends java.lang.Object

  Audio device manager for managing audio input/output devices.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private IAudioDeviceManagerObserver` | `_AudioDeviceManagerObserver` Audio device manager observer
    `private long` | `cptr` Native pointer

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AgoraAudioDeviceManager(long cptr)` Constructs an AgoraAudioDeviceManager.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `AgoraRecordDevice` | `createRecordingDeviceSource(java.lang.String device_id)` Creates a recording device source.
    `void` | `destroy()` Destroys the audio device manager and releases resources.
    `int` | `getMicrophoneMute(Out<java.lang.Integer> mute)` Gets the microphone mute state.
    `int` | `getMicrophoneVolume(Out<java.lang.Integer> volume)` Gets the microphone volume.
    `int` | `getSpeakerMute(Out<java.lang.Integer> mute)` Gets the speaker mute state.
    `int` | `getSpeakerVolume(Out<java.lang.Integer> volume)` Gets the speaker volume.
    `private void` | `ndestroy()` Native destroy method
    `int` | `registerObserver(IAudioDeviceManagerObserver observer)` Registers an audio device manager observer.
    `int` | `setMicrophoneMute(int mute)` Sets the microphone mute state.
    `int` | `setMicrophoneVolume(int volume)` Sets the microphone volume.
    `int` | `setSpeakerMute(int mute)` Sets the speaker mute state.
    `int` | `setSpeakerVolume(int volume)` Sets the speaker volume.
    `int` | `unregisterObserver(IAudioDeviceManagerObserver observer)` Unregisters an audio device manager observer.

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

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

- - ### Field Detail

    - #### cptr

          private long cptr

      Native pointer

    - #### _AudioDeviceManagerObserver

          private IAudioDeviceManagerObserver _AudioDeviceManagerObserver

      Audio device manager observer

  - ### Constructor Detail

    - #### AgoraAudioDeviceManager

          public AgoraAudioDeviceManager(long cptr)

      Constructs an AgoraAudioDeviceManager.
      Parameters:
        `cptr` - Native pointer

  - ### Method Detail

    - #### ndestroy

          private void ndestroy()

      Native destroy method

    - #### destroy

          public void destroy()

      Destroys the audio device manager and releases resources.

    - #### createRecordingDeviceSource

          public AgoraRecordDevice createRecordingDeviceSource(java.lang.String device_id)

      Creates a recording device source.
      Parameters:
        `device_id` - Device ID
      Returns:
        Recording device

    - #### setMicrophoneVolume

          public int setMicrophoneVolume(int volume)

      Sets the microphone volume.
      Parameters:
        `volume` - Volume level
      Returns:
        Result code

    - #### getMicrophoneVolume

          public int getMicrophoneVolume(Out<java.lang.Integer> volume)

      Gets the microphone volume.
      Parameters:
        `volume` - Output parameter for volume
      Returns:
        Result code

    - #### setSpeakerVolume

          public int setSpeakerVolume(int volume)

      Sets the speaker volume.
      Parameters:
        `volume` - Volume level
      Returns:
        Result code

    - #### getSpeakerVolume

          public int getSpeakerVolume(Out<java.lang.Integer> volume)

      Gets the speaker volume.
      Parameters:
        `volume` - Output parameter for volume
      Returns:
        Result code

    - #### setMicrophoneMute

          public int setMicrophoneMute(int mute)

      Sets the microphone mute state.
      Parameters:
        `mute` - Mute state (1 for muted, 0 for unmuted)
      Returns:
        Result code

    - #### getMicrophoneMute

          public int getMicrophoneMute(Out<java.lang.Integer> mute)

      Gets the microphone mute state.
      Parameters:
        `mute` - Output parameter for mute state
      Returns:
        Result code

    - #### setSpeakerMute

          public int setSpeakerMute(int mute)

      Sets the speaker mute state.
      Parameters:
        `mute` - Mute state (1 for muted, 0 for unmuted)
      Returns:
        Result code

    - #### getSpeakerMute

          public int getSpeakerMute(Out<java.lang.Integer> mute)

      Gets the speaker mute state.
      Parameters:
        `mute` - Output parameter for mute state
      Returns:
        Result code

    - #### registerObserver

          public int registerObserver(IAudioDeviceManagerObserver observer)

      Registers an audio device manager observer.
      Parameters:
        `observer` - Observer to register
      Returns:
        Result code

    - #### unregisterObserver

          public int unregisterObserver(IAudioDeviceManagerObserver observer)

      Unregisters an audio device manager observer.
      Parameters:
        `observer` - Observer to unregister
      Returns:
        Result code