# Core features

<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->

The Video SDK for Linux lets users speak and hear each other in a session over VoIP. Users who can't connect over VoIP can dial in by phone. For more information, see [Public Switched Telephone Network (PSTN)](/docs/video-sdk/linux/pstn/).

The core controls let you check audio status, connect to audio, mute and unmute, and disconnect. For host-only controls, see [Host audio controls](/docs/video-sdk/linux/audio/host-controls/).

You control user audio with `IZoomVideoSDKAudioHelper`. Before changing any audio state, check whether the user is already connected to audio by reading the user's `ZoomVideoSDKAudioType`.

## Check whether a user is connected to audio

To determine a user's audio state, read the `audioType` from their `ZoomVideoSDKAudioStatus`.

```cpp
// Get the user's audio status.
ZoomVideoSDKAudioStatus audioStatus = pUserInfo->getAudioStatus();
// Get the user's audio type.
ZoomVideoSDKAudioType audioType = audioStatus.audioType;
```

`audioType` is one of the values defined on `ZoomVideoSDKAudioType`.

| Value                             | Meaning                                                                                                                                    |
| --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| `ZoomVideoSDKAudioType_None`      | The user is not connected to session audio.                                                                                                |
| `ZoomVideoSDKAudioType_VOIP`      | The user is connected over VoIP (microphone and speaker).                                                                                  |
| `ZoomVideoSDKAudioType_Telephony` | The user is connected by phone dial-in. For more information, see [Public Switched Telephone Network (PSTN)](/docs/video-sdk/linux/pstn/). |

## Connect to audio

If the user is not already connected, connect to the audio through the `IZoomVideoSDKAudioHelper`.

```cpp
if (audioType == ZoomVideoSDKAudioType_None) {
    // User's audio is not connected.
    // Get the IZoomVideoSDKAudioHelper to perform audio actions.
    IZoomVideoSDKAudioHelper* pAudioHelper = m_pVideoSDK->getAudioHelper();
    if (pAudioHelper) {
        // Connect the user's audio.
        pAudioHelper->startAudio();
    }
} else {
    // User is already connected to audio.
}
```

## Mute and unmute a user

Once connected, mute a user's audio by calling `muteAudio` with the associated `IZoomVideoSDKUser`.

```cpp
// Get the IZoomVideoSDKAudioHelper to perform audio actions.
IZoomVideoSDKAudioHelper* pAudioHelper = m_pVideoSDK->getAudioHelper();
if (pAudioHelper) {
    // Mute the user.
    pAudioHelper->muteAudio(pUser);
}
```

Unmute a user's audio in the same way using `unMuteAudio`.

```cpp
// Get the IZoomVideoSDKAudioHelper to perform audio actions.
IZoomVideoSDKAudioHelper* pAudioHelper = m_pVideoSDK->getAudioHelper();
if (pAudioHelper) {
    // Unmute the user.
    pAudioHelper->unMuteAudio(pUser);
}
```

When the local user is the session host, muting and unmuting behave differently for remote users. For more information, see [Host audio controls](/docs/video-sdk/linux/audio/host-controls/).

## Disconnect from audio

To disconnect a user from audio completely, call `stopAudio`. Use this only when the user explicitly disconnects. To silence a user temporarily, use `muteAudio` instead.

```cpp
// Get the IZoomVideoSDKAudioHelper to perform audio actions.
IZoomVideoSDKAudioHelper* pAudioHelper = m_pVideoSDK->getAudioHelper();
if (pAudioHelper) {
    // Disconnect the user's audio.
    pAudioHelper->stopAudio();
}
```
