# Manage media and devices (/en/realtime-media/broadcast-streaming/build/control-audio-and-devices/volume-control-and-mute/blueprint)

> For AI agents: see the complete documentation index at [llms.txt](/llms.txt).

This page shows you how to configure volume settings for audio recording, audio playback, and for the playback of music files.

## Understand the tech [#understand-the-tech]

Agora Video SDK supports adjusting the audio volume for both recording and playback to meet practical application use-cases. For example, during a two-person call, you can mute a remote user by adjusting the playback volume setting to 0.

      
  
      
  
      
  
      
  
      
  
      
  
      
  
      
  
      
  
      
  
      
  
      
    The figure below shows the workflow of adjusting the volume.
    **Volume adjust workflow**

    ![VolumeControlMute](https://assets-docs.agora.io/images/video-sdk/volume-control-mute-adjustVolume.svg)

    **Playback** refers to transmitting an audio signal from a sender to a recipient, where it is played back through a playback device.

    **Recording** refers to the process in which audio signals are captured by a recording device and then sent to the transmitter.

    <CalloutContainer type="warning">
      <CalloutDescription>
        If you set the volume too high using the signal volume adjustment methods, it may lead to audio distortion on some devices.
      </CalloutDescription>
    </CalloutContainer>

    ## Prerequisites [#prerequisites-11]

    Ensure that you have implemented the [SDK quickstart](../../index) in your project.

    ## Implement volume control [#implement-volume-control-11]

    ### Adjust playback volume [#adjust-playback-volume]

    This section shows you how to adjust the audio playback signal volume using `AdjustPlaybackSignalVolume`.

    1. Create UMG

    Create a **Slider** widget named **Slider\_PlaybackSignalVolume** for users to drag the volume bar to adjust the playback volume. In this example, set the minimum value to `0` (mute) and the maximum value to `100` (original volume), as shown in the following figure:

    ![VolumeControlMute](https://assets-docs.agora.io/images/video-sdk/volume-control-mute-implementation-blueprint-1.png)

    2. Bind UI Events

    Create a **Bind Event to On Value Changed node** and connect it to the **Slider\_PlaybackSignalVolume** widget and the **OnPlaybackSignalVolumeValChanged** callback. When users drag the volume bar to adjust the audio playback signal, the **OnPlaybackSignalVolumeValChanged** callback is triggered, as shown in the following figure:

    ![VolumeControlMute](https://assets-docs.agora.io/images/video-sdk/volume-control-mute-implementation-blueprint-2.png)

    3. Implement Callback Function

    Create **OnPlaybackSignalVolumeValChanged** callback function with the following parameters:

    | Input parameter | Data type | Parameter description |
    | --------------- | --------- | --------------------- |
    | `value`         | Float     | Playback Volume       |

    When this callback is triggered, the specified playback volume is obtained and assigned to the Volume parameter of **Adjust Playback Signal Volume**. The **AdjustPlaybackSignalVolume** method is called to adjust the playback volume, as shown in the following figure:

    ![VolumeControlMute](https://assets-docs.agora.io/images/video-sdk/volume-control-mute-implementation-blueprint-3.png)

    ### Adjust recording volume [#adjust-recording-volume]

    This section shows you how to adjust the audio recording signal volume using `AdjustRecordingSignalVolume`.

    1. Create UMG

    Create a **Slider** widget named **Slider\_RecordingSignalVolume** to enable users to adjust the recording volume. For this example, set the minimum value to `0` (mute) and the maximum value to `100` (original volume), as shown in the following figure:

    ![VolumeControlMute](https://assets-docs.agora.io/images/video-sdk/volume-control-mute-implementation-blueprint-4.png)

    2. Bind UI Events

    Create a **Bind Event to On Value Changed node** and connect it to the **Slider\_RecordingSignalVolume** widget and the **OnRecordingSignalVolumeValChanged** callback. When users drag the volume bar to adjust the audio recording signal, the **OnRecordingSignalVolumeValChanged** callback is triggered, as shown in the following figure:

    ![VolumeControlMute](https://assets-docs.agora.io/images/video-sdk/volume-control-mute-implementation-blueprint-5.png)

    3. Implement UI Events

    Create the **OnRecordingSignalVolumeValChanged** callback function with the following parameters:

    | Input parameter | Data type | Parameter description |
    | --------------- | --------- | --------------------- |
    | `value`         | Float     | Recording Volume      |

    When the callback is triggered, the specified recording volume is obtained and assigned to the Volume parameter of **Adjust Recording Signal Volume**. The **AdjustRecordingSignalVolume** method is called to adjust the recording volume, as shown in the following figure:
    ![VolumeControlMute](https://assets-docs.agora.io/images/video-sdk/volume-control-mute-implementation-blueprint-6.png)

    When configuring audio settings, it's essential to understand the default behavior and the options available. Here are the key points to keep in mind:

    * The SDK defaults to a device volume of `85` when using the recording device to capture audio signals.
    * A volume of `0` means mute, and a volume of `255` represents the maximum volume of the device.
    * If the SDK detects that the recording volume is too low in the current environment, it automatically increases the volume of the recording device.
    * The volume of the recording device directly influences the global volume of the device.
    * If the default recording device volume does not meet your requirements, adjust it by regulating the signal amplitude captured by the microphone or sound card.

    ### Get volume information of users [#get-volume-information-of-users-10]

    Throughout the process of audio recording, mixing, and playback, you can obtain the user IDs and volumes of the three users with the highest instant volumes in the channel using the `FOnAudioVolumeIndication` callback. A returned `uid` of `0` represents the local user. You need to call the `EnableAudioVolumeIndication` method to activate the voice detection function to receive this callback.

    1. Create UMG

    Create a **Button** widget named **Btn\_EnableAudioIndication** for users to control whether to enable the volume indication. As shown in the following figure:

    ![VolumeControlMute](https://assets-docs.agora.io/images/video-sdk/volume-control-mute-implementation-blueprint-7.png)

    2. Bind UI Events

    Create a **Bind Event to On Clicked node** and connect it to the **Btn\_EnableAudioIndication** widget and the **OnVolumeIndicationClick** callback. When users press the button to enable the volume indication, the **OnVolumeIndicationClick** callback is triggered, as shown in the following figure:

    ![VolumeControlMute](https://assets-docs.agora.io/images/video-sdk/volume-control-mute-implementation-blueprint-8.png)

    3. Implement UI Events

    Create the **OnVolumeIndicationClick** callback function. When this callback is triggered, the **Enable Audio Volume Indication** method is called to enable volume indication. In this example, set the volume indication **Interval** to 200 milliseconds, the smoothing factor **Smooth** to 3, and check **Report Vad** to activate the voice detection function, as shown in the following figure:

    ![VolumeControlMute](https://assets-docs.agora.io/images/video-sdk/volume-control-mute-implementation-blueprint-9.png)

    4. Add Callback Event

    5. Create the **OnAudioVolumeIndication** callback function with the following parameters:

    | Input parameter | Data type | Parameter description                                                                                                                                                                                                         |
    | --------------- | --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
    | `speaker`       | Float     | Structure Volume information of users, see [FAudioVolumeInfo](https://api-ref.agora.io/en/video-sdk/blueprint/4.x/API/class_irtcengineeventhandler.html#callback_irtcengineeventhandler_onaudiovolumeindication) for details. |
    | `totalVolume`   | Integer   | The total volume after mixing                                                                                                                                                                                                 |

    2. Enable listening to the **OnAudioVolumeIndication** callback, as shown in the following figure:

       ![VolumeControlMute](https://assets-docs.agora.io/images/video-sdk/volume-control-mute-implementation-blueprint-10.png)

    3. When the **OnAudioVolumeIndication** callback is triggered, print the received user volume information, as shown in the following figure:

       ![VolumeControlMute](https://assets-docs.agora.io/images/video-sdk/volume-control-mute-implementation-blueprint-11.png)

    ## Reference [#reference-11]

    This section contains content that completes the information on this page, or points you to documentation that explains other aspects to this product.

    ### Sample projects [#sample-projects-9]

    Agora provides an open-source [Blueprint sample project](https://github.com/AgoraIO-Extensions/Agora-Unreal-RTC-SDK/tree/main/Agora-Unreal-SDK-Blueprint-Example) on GitHub for your reference.
    To learn how to implement call volume adjustment, refer to [JoinChannelAudio](https://github.com/AgoraIO-Extensions/Agora-Unreal-RTC-SDK/tree/main/Agora-Unreal-SDK-Blueprint-Example/Content/API-Example/Basic/JoinChannelAudio) in the sample project.

    ### Frequently asked questions [#frequently-asked-questions-9]

    * [How can I solve the problem of low volume?](/en/api-reference/faq/quality/audio_low)

    ### API reference [#api-reference-11]

    * [`adjustRecordingSignalVolume`](https://api-ref.agora.io/en/video-sdk/blueprint/4.x/API/class_irtcengine.html#api_irtcengine_adjustrecordingsignalvolume)
    * [`adjustPlaybackSignalVolume`](https://api-ref.agora.io/en/video-sdk/blueprint/4.x/API/class_irtcengine.html#api_irtcengine_adjustplaybacksignalvolume)
    * [`adjustUserPlaybackSignalVolume`](https://api-ref.agora.io/en/video-sdk/blueprint/4.x/API/class_irtcengine.html#api_irtcengine_adjustuserplaybacksignalvolume)
    * [`adjustAudioMixingPlayoutVolume`](https://api-ref.agora.io/en/video-sdk/blueprint/4.x/API/class_irtcengine.html#api_irtcengine_adjustaudiomixingplayoutvolume)
    * [`FOnAudioVolumeIndication`](https://api-ref.agora.io/en/video-sdk/blueprint/4.x/API/class_irtcengineeventhandler.html#callback_irtcengineeventhandler_onaudiovolumeindication)

    ### See also [#see-also-11]

    * [Custom audio source](custom-audio)
    * [Custom video source](custom-video)

    
  
      
  
