# Advanced features

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

Beyond the core audio controls, the Video SDK for iOS offers several advanced audio features.

## Monitor mic and speaker volume

The SDK reports the local microphone and speaker volume levels through the `onMicSpeakerVolumeChanged` callback. Use this to drive a volume meter in your UI or to detect when the mic gain has been pushed unusually low.

```swift
func onMicSpeakerVolumeChanged(_ micVolume: UInt32, speakerVolume: UInt32) {
    updateMicMeter(micVolume)
    updateSpeakerMeter(speakerVolume)
}
```

```objectivec
- (void)onMicSpeakerVolumeChanged:(unsigned int)micVolume speakerVolume:(unsigned int)speakerVolume {
    [self updateMicMeter:micVolume];
    [self updateSpeakerMeter:speakerVolume];
}
```

## Adjust a user's local playback volume

You can control how loud each user sounds _on the local device_ using `setUserPlaybackVolume` on the `ZoomVideoSDKUser` object. This only changes what the current user hears. It does not change the volume for any other participant in the session. The volume is a float between 0 and 10; setting it to 0 silences that user on your device only.

The `isSharingAudio` argument selects whether you are adjusting microphone audio (`false`) or shared audio (`true`, used when the user is sharing a screen with audio). Use `canSetUserPlaybackVolume` to check whether the SDK currently permits a volume change for that audio source. For example, the SDK returns `false` for a user who is not connected to audio.

```swift
// Lower a remote user's microphone audio on this device only.
if remoteUser.canSetUserPlaybackVolume(false) {
    remoteUser.setUserPlaybackVolume(5.0, isSharingAudio: false)
}

// Read the current local playback volume.
var currentVolume: Float = 0
remoteUser.getUserPlaybackVolume(&currentVolume, isSharingAudio: false)
```

```objectivec
// Lower a remote user's microphone audio on this device only.
if ([remoteUser canSetUserPlaybackVolume:NO]) {
    [remoteUser setUserPlaybackVolume:5.0 isSharingAudio:NO];
}

// Read the current local playback volume.
float currentVolume = 0;
[remoteUser getUserPlaybackVolume:&currentVolume isSharingAudio:NO];
```

## Subscribe to raw audio data

For server-side processing, transcription, or custom audio pipelines, the SDK can deliver raw PCM audio. Call `subscribe` on the `ZoomVideoSDKAudioHelper` to begin receiving raw audio, and `unSubscribe` to stop. The mixed, per-user, and shared raw streams arrive through the [`onMixedAudioRawDataReceived`](/docs/video-sdk/ios/audio/audio-events/#get-notified-when-mixed-audio-raw-data-is-received), [`onOneWayAudioRawDataReceived`](/docs/video-sdk/ios/audio/audio-events/#get-notified-when-one-way-audio-raw-data-is-received), and [`onSharedAudioRawDataReceived`](/docs/video-sdk/ios/audio/audio-events/#get-notified-when-shared-audio-raw-data-is-received) callbacks.

```swift
ZoomVideoSDK.shareInstance()?.getAudioHelper()?.subscribe()
```

```objectivec
[[[ZoomVideoSDK shareInstance] getAudioHelper] subscribe];
```

For the full raw-data integration pattern (buffer format, sample rate, and processing examples), see [Receive raw data](/docs/video-sdk/ios/raw-data/receive-raw-data/).
