# Release notes (/en/realtime-media/voice/reference/release-notes/macos)

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

### Known issues [#known-issues-3]

    The list of known issues page is continuously updated as the systems evolve. Agora suggests you regularly upgrade to the latest version of the SDK, which includes new features, bug fixes and improvements.

    * MacOS SDK v4.4.0

      **MacOS 15 Sequoia beta system issue**

      When the app path (including the App name) contains non-English characters (such as Chinese characters), the compiled `Metal shader library` may not contain any methods, causing the app to crash. See [this article](/en/api-reference/faq/other/macos_15_beta) for the workaround.

    <CalloutContainer type="info">
      <CalloutDescription>
        As of v4.5.0, both Voice SDK and Signaling SDK (v2.2.0 and above) include the `aosl.xcframework` library. If you manually integrate Voice SDK via CDN and also use Signaling SDK, delete the earlier version of the `aosl.xcframework` library to avoid conflicts.
      </CalloutDescription>
    </CalloutContainer>

    ### v4.6.2 [#v462-2]

    Released on January 19, 2026.

    #### Improvements [#improvements-27]

    This release includes the following enhancements:

    * **Seamless switching for sound effect files**

      Adds support for seamless switching of sound effect files. For the same sound effect file, if you call `preloadEffect` followed by `playEffect`, the SDK does not close the file after playback completes or when `stopEffect` is called. When you call `playEffect` again, the SDK reuses the loaded file to enable loop playback and seamless switching. This feature also works in multi-channel scenarios.

    * **Improved accuracy of network quality evaluation**

      Improves the accuracy of network quality evaluation in the `networkQuality` callback, making the reported data better reflect the user's perceived experience.

    * **Support for 24kHz sampling rate for audio playback**

      Adds support for audio data with a sample rate of 24000 Hz in `onPlaybackAudioFrame`. When calling `setPlaybackAudioFrameParameters` to set the playback audio format, you can set `sampleRate` to `24000`.

    * **Additional improvements**

      * Adds error codes `AgoraErrorCodePcmSendFormat (200)` and `AgoraErrorCodePcmSendBufferOverflow (201)` to report PCM data transmission errors.

    #### Compatibility changes [#compatibility-changes-16]

    This release introduces the following compatibility changes:

    * **Decoder plugins built into the SDK**

      The relevant decoder plugins are now built into the SDK to ensure overall decoding compatibility.

    ### v4.6.0 [#v460-2]

    Released on August 26, 2025.

    <CalloutContainer type="info">
      <CalloutDescription>
        The version of the aosl.xcframework library in the v4.6.0 SDK is 1.3.0. You can find the library version information in Info.plist.
      </CalloutDescription>
    </CalloutContainer>

    #### Compatibility changes [#compatibility-changes-17]

    This version includes SDK behavior changes, API deprecations, and deletions. To ensure your app functions correctly, update your code after upgrading to this version.

    For details on deprecated and deleted APIs in each version, see the [API Sunset Notice](/en/api-reference/api-ref/voice/api-sunset).

    * **Deprecation of direct CDN streaming APIs**

      Deprecates the APIs related to direct CDN streaming, which will be removed in a future release. Agora recommends using [Media Push](/media-push/product-overview) instead.

      * `setDirectCdnStreamingAudioConfiguration:`
      * `setDirectCdnStreamingVideoConfiguration:`
      * `startDirectCdnStreaming:publishUrl:mediaOptions:`
      * `stopDirectCdnStreaming`
      * `rtcEngine:didDirectCdnStreamingStateChanged:reason:message:`
      * `AgoraDirectCdnStreamingMediaOptions`
      * `AgoraDirectCdnStreamingStats`
      * `AgoraDirectCdnStreamingState`
      * `AgoraDirectCdnStreamingReason`

    * **Deprecation of virtual metronome APIs**

      Deprecates the APIs for the virtual metronome feature, which will be removed in a future release.

      * `startRhythmPlayer:sound2:config:`
      * `configRhythmPlayer:`
      * `rtcEngine:didRhythmPlayerStateChanged:reason:`

    * **Deletion of redundant APIs**

      Removed the following redundant APIs and parameters:

      * `setLocalPublishFallbackOption:`
      * `rtcEngine:didLocalPublishFallbackToAudioOnly:`
      * `downlinkNetworkInfoUpdate`
      * `wlAccStats`
      * `AgoraWlAccReason`
      * `AgoraWlAccAction`
      * `rtcEngine:wlAccStats:averageStats:`
      * `rtcEngine:wlAccMessage:action:wlAccMsg:`
      * `enableWirelessAccelerate`
      * `receivedFrameRate` (removed from `AgoraRtcRemoteVideoStats`)

    * **Changes to int UID and string UID mapping**

      * Before v4.6.0: If `registerLocalUserAccountWithAppID:userAccount:` was used to register a string UID (for example, "aa") and obtain an int UID (for example, 123), joining a channel later with the int UID automatically mapped it to the original string UID ("aa").
      * From v4.6.0: The SDK no longer automatically maps an int UID to the original string UID. If `registerLocalUserAccountWithAppID:userAccount:` was called to get an int UID but the channel needs to be joined with the original string UID, call `joinChannelByUserAccount:token:channelId:joinSuccess:` directly with the string UID. After upgrading, review and update app logic to ensure users join the channel with the expected identity.

    #### New features [#new-features-25]

    * **Multipath network transmission**

      Introduced multipath transmission for devices with multiple network interfaces (for example, 5G, Wi-Fi, and LAN). This feature effectively reduces or eliminates experience degradation caused by poor network conditions, making it suitable for real-time audio and video communication scenarios that demand high transmission stability, such as in-vehicle systems, IoT, trains, and highways. Enable it by setting `enableMultipath` in `AgoraRtcChannelMediaOptions` to `YES`.

      * *Dynamic mode*: Dynamically selects the optimal path based on network conditions. Optionally set `preferMultipathType` to prioritize a path type. If not set, all path types have the same default weight.
      * *Duplicate mode*: Sends data simultaneously over all available paths for maximum stability. This mode incurs additional costs and eliminates the impact of poor network conditions.

      Configure uplink and downlink modes separately with `uplinkMultipathMode` and `downlinkMultipathMode`. Monitor performance with the `rtcEngine:didMultipathStatsChanged:` callback, which reports real-time transmission statistics for each path, including data consumption. Contact [support@agora.io](mailto\:support@agora.io) to enable duplicate mode.

    * **Asynchronous engine destruction**

      Added the `destroy:` method, supporting synchronous or asynchronous engine destruction. In asynchronous mode, the SDK triggers the `engineReleasedBlock` callback.

    * **Token renewal result callback**

      Added the `rtcEngine:didRenewTokenResult:` callback and `RENEW_TOKEN_ERROR_CODE` to report the result of `renewToken:`. This allows developers to handle Token renewal failures promptly within the callback.

    * **Other new features**

      * Added `setPlaybackAudioFrameBeforeMixingParameters:` to configure the format of raw audio frames returned in `onPlaybackAudioFrameBeforeMixing:channelId:uid:`, including sample rate, number of channels, and the number of samples per callback.
      * Added `preloadEffectEx:soundId:` to preload audio effects into a specific channel. Supports both local and online audio files, enabling faster playback later and is suitable for multi-channel scenarios.
      * Added `playEffectEx:soundId:filePath:loopCount:pitch:pan:gain:publish:startPos:` for advanced audio effect playback in a specific channel with parameters such as loop count, pitch, spatial position, volume, whether to publish to the channel, and the starting playback position.

    #### Improvements [#improvements-28]

    * Added support for G.711 and G.722 audio codecs when interoperating with the Web SDK for improved cross-platform audio compatibility and clarity.

    #### Fixed issues [#fixed-issues-2]

    This version fixes the following issues:

    * Online audio effect playback restarted from the beginning when `seekToPosition:` was called.
    * Occasional echoes in media volume mode when publishing a microphone stream while simultaneously playing effects with `playEffect:filePath:loopCount:pitch:pan:gain:publish:startPos:` and music with `startAudioMixing:loopback:cycle:startPos:`.
    * Missing media metadata observer callback in cases where `setMediaMetadataDelegate:withType:` was called after `setExternalVideoSource:useTexture:sourceType:`.
    * Occasional crashes.
    * Media relay occasionally reported `AgoraChannelMediaRelayStateFailure` and `AgoraChannelMediaRelayErrorServerErrorResponse` after the following sequence: join, relay, unpublish, leave, rejoin, and start relay again.

    ### v4.5.2 [#v452-2]

    v4.5.2 was released on April 22, 2025.

    <CalloutContainer type="info">
      <CalloutDescription>
        The `aosl.xcframework` library version in Voice SDK v4.5.2 is 1.2.13. You can check the version in the `Info.plist` file.
      </CalloutDescription>
    </CalloutContainer>

    #### Issues fixed [#issues-fixed-30]

    This release fixes the following issues:

    * While playing a multi-track media file, noise was heard when adjusting the audio pitch using `setAudioPitch`.
    * When the host called `createCustomAudioTrack:config:` to create a custom audio track with `trackType` set to `AUDIO_TRACK_DIRECT`, then called `pushExternalAudioFrameRawData:samples:sampleRate:channels:trackId:timestamp:` to push custom audio frames to a channel, and finally called `playEffect:filePath:loopCount:pitch:pan:gain:publish:startPos:` to play an audio effect, audience members in the channel heard noise.
    * Apps using the SDK occasionally experienced UI lag caused by main thread blocking during audio and video interactions.
    * Calling `openWithMediaSource:` and setting `isLiveSource` to `YES` in the source parameter to play a video stream caused playback failure.
    * When the sender transmitted multi-channel encoded audio, noise was occasionally heard by the receiver.
    * When the app integrated a media player and called `open` twice to load different media resources consecutively, the second call incorrectly triggered the `AgoraRtcMediaPlayer:infoUpdated:` callback with information from the first media resource.
    * After enabling user volume indication with `enableAudioVolumeIndication:smooth:reportVad:`, the `rtcEngine:reportAudioVolumeIndicationOfSpeakers:totalVolume:` callback reported a local user volume of 0 for both local and remote users.
    * When you called `enableVideoImageSource:options:` to enable the video image source feature, the sender streamed successfully but the `rtcEngine:didVideoPublishStateChange:sourceType:oldState:newState:elapseSinceLastState:` callback occasionally did not return the expected result.
    * In multi-channel scenarios, if the app called `setupRemoteVideoEx:connection:` to initialize the remote user's view before successfully calling `joinChannelExByToken:connection:delegate:mediaOptions:`, the view failed to display correctly.

    ### v4.5.1 [#v451-2]

    v4.5.1 was released on March 6, 2025.

    <CalloutContainer type="info">
      <CalloutDescription>
        The `aosl.xcframework` library version in Video SDK v4.5.1 is 1.2.13. You can check the version in the `Info.plist` file.
      </CalloutDescription>
    </CalloutContainer>

    #### New Features [#new-features-26]

    1. **AI Conversation Scenario**

       This version introduces the `AgoraAudioScenarioAiClient` audio scenario, specifically designed for interacting with the conversational AI agent created by [Conversational AI Engine](/en/ai). This scenario optimizes the audio transmission algorithm based on the characteristics of AI-generated voices, ensuring stable voice data transmission even in weak network conditions with up to 80% packet loss. The optimization enhances conversation continuity and reliability, adapting to various challenging network environments.

    #### Issues Fixed [#issues-fixed-31]

    This release resolves the following issues:

    * When using the `pause` method to pause playback, then calling `seekToPosition:` to move to a specific position, and finally calling `play`, the Media Player resumed from the paused position instead of the specified position.
    * When using the Media Player, the file path of the media resource returned by `getPlaySrc` did not update after calling `switchSrc:syncPts:` to switch to a new media resource.
    * In interactive live streaming scenarios, after joining a channel as an audience member using a `string` user ID, audio occasionally became unsynchronized with video.
    * AI noise suppression and AI echo cancellation plugins sometimes failed when used together.

    ### v4.5.0 [#v450-2]

    v4.5.0 was released on November 27, 2024.

    #### Compatibility changes [#compatibility-changes-18]

    This version includes optimizations to some features, including changes to SDK behavior and API renaming and deletion. To ensure normal operation of the project, update the code in the app after upgrading to this release.

    <CalloutContainer type="info">
      <CalloutDescription>
        As of v4.5.0, both Video SDK and Signaling SDK (v2.2.0 and above) include the `aosl.xcframework` library. If you manually integrate Video SDK via CDN and also use Signaling SDK, delete the earlier version of the `aosl.xcframework` library to avoid conflicts. The `aosl.xcframework` library version in Video SDK v4.5.0 is 1.2.13. You can check the version in the `Info.plist` file.
      </CalloutDescription>
    </CalloutContainer>

    1. **Automatic installation of virtual sound card**

       Starting from this version, the SDK supports the automatic installation of a virtual sound card. When you call [`enableLoopbackRecording:deviceName:`](https://api-ref.agora.io/en/video-sdk/macos/4.x/API/agorartckit/agorartcenginekit/enableloopbackrecording\(_\:devicename:\)) for the first time, the SDK will automatically install the AgoraALD, a virtual sound card developed by Agora. Once the installation is successful, the audio routing will automatically switch to the virtual sound card, and the virtual sound card will be used for audio capture.

    #### New features [#new-features-27]

    1. **Local audio mixing**

       This version introduces the local audio mixing feature. You can call the `startLocalAudioMixer` method to mix the audio streams from the local microphone, media player, sound card, and remote audio streams into a single audio stream, which can then be published to the channel. When you no longer need audio mixing, you can call the `stopLocalAudioMixer` method to stop local audio mixing. During the mixing process, you can call the `updateLocalAudioMixerConfiguration` method to update the configuration of the audio streams being mixed.

       Example use cases for this feature include:

       * When using the local video mixing feature, the associated audio streams of the mixed video streams can be simultaneously captured and published.
       * In live streaming use-cases, users can receive audio streams within the channel, mix multiple audio streams locally, and then forward the mixed audio stream to other channels.
       * In educational use-cases, teachers can mix the audio from interactions with students locally and then forward the mixed audio stream to other channels.

    2. **Others**

       * The `rtcEngine:device:type:stateChanged:` callback supports reporting that the device has been plugged in.

    #### Improvements [#improvements-29]

    1. **Custom audio capture improvements**

       This version adds the `enableAudioProcessing` member parameter to [`AgoraAudioTrackConfig`](https://api-ref.agora.io/en/video-sdk/macos/4.x/API/agorartckit/agoraaudiotrackconfig), which is used to control whether to enable 3A audio processing for custom audio capture tracks of the `AUDIO_TRACK_DIRECT` type. The default value of this parameter is `NO`, meaning that audio processing is not enabled. Users can enable it as needed, enhancing the flexibility of custom audio processing.

    2. **Other improvements**

       * This version optimizes the logic for calling `queryDeviceScore` to obtain device score levels, improving the accuracy of the score results.
       * When calling `switchSrc:syncPts:` to switch between live streams or on-demand streams of different resolutions, smooth and seamless switching can be achieved. An automatic retry mechanism has been added in case of switching failures. The SDK will automatically retry 3 times after a failure. If it still fails, the `AgoraRtcMediaPlayer:didOccurEvent:elapsedTime:message:` callback will report the `AgoraMediaPlayerEventSwitchError` event, indicating that an error occurred during media resource switching.
       * When calling `setPlaybackSpeed:` to set the playback speed of an audio file, the minimum supported speed is 0.3x.

    #### Bug fixes [#bug-fixes-2]

    This version fixes the following issue:

    * Calling `startAudioMixing:loopback:cycle:` and then immediately calling `pauseAudioMixing` to pause the music file playback does not take effect.

    ### v4.4.0 [#v440-2]

    v4.4.0 was released on August 5, 2024.

    #### Compatibility changes [#compatibility-changes-19]

    This version includes optimizations to some features, including changes to SDK behavior and API renaming and deletion. To ensure normal operation of the project, update the code in the app after upgrading to this release.

    <CalloutContainer type="info">
      <CalloutDescription>
        Starting from v4.4.0, the SDK provides an API sunset notice, which includes information about deprecated and removed APIs in each version. See [API sunset notice](/en/api-reference/api-ref/voice/api-sunset).
      </CalloutDescription>
    </CalloutContainer>

    1. To distinguish context information in different extension callbacks, this version removes the original extension callbacks and adds corresponding callbacks that contain context information (see table below). You can identify the extension name, the user ID, and the service provider name through `AgoraExtensionContext` in each callback.

       | Original callback    | New callback                    |
       | -------------------- | ------------------------------- |
       | `onEvent`            | `onExtensionEventWithContext`   |
       | `onExtensionStarted` | `onExtensionStartedWithContext` |
       | `onExtensionStopped` | `onExtensionStoppedWithContext` |
       | `onExtensionError`   | `onExtensionErrorWithContext`   |

    2. This version renames the `receiveMetadata` callback to `didMetadataReceived` and removes the `data` and `timeStamp` parameters. You can get metadata-related information, including `timeStamp` (timestamp of the sent data), `uid` (user ID), and `channelId` (channel name) through the newly-added `metadata` parameter.

    #### New features [#new-features-28]

    1. **Voice AI tuner**

       This version introduces the voice AI tuner feature, which can enhance the sound quality and tone, similar to a physical sound card. You can enable the voice AI tuner feature by calling the `enableVoiceAITuner` method and passing in the sound effect types supported in the `AgoraVoiceAITunerType` enum to achieve effects like deep voice, cute voice, husky singing voice, and so on.

    #### Improvements [#improvements-30]

    This version includes the following improvements:

    * Optimizes transmission strategy: Calling `enableInstantMediaRendering` no longer impacts the security of the transmission link.
    * Deprecates redundant enumeration values `AgoraClientRoleChangeFailedRequestTimeout` and `AgoraClientRoleChangeFailedConnectionFailed` in `AgoraClientRoleChangeFailedReason`.

    ### v4.3.2 [#v432-2]

    v4.3.2 was released on June 4, 2024.

    #### Improvements [#improvements-31]

    This release enhances the usability of the [setRemoteSubscribeFallbackOption](https://api-ref.agora.io/en/voice-sdk/macos/4.x/API/agorartckit/agorartcenginekit/setremotesubscribefallbackoption\(_:\)) method by removing the timing requirements for invocation. It can now be called both before and after joining the channel to dynamically switch audio and video stream fallback options in weak network conditions.

    #### Issues fixed [#issues-fixed-32]

    This version fixed the following issues:

    * Occasional video smoothness issues during audio and video interactions.
    * The app occasionally crashed when remote users left the channel.

    ### v4.3.1 [#v431-2]

    v4.3.1 was released on April 29, 2024.

    #### New Features [#new-features-29]

    1. **Data stream encryption**

       This version adds `datastreamEncryptionEnabled` to [AgoraEncryptionConfig](https://api-ref.agora.io/en/voice-sdk/macos/4.x/API/agorartckit/agoraencryptionconfig) for enabling data stream encryption. You can set this when you activate encryption with [enableEncryption](https://api-ref.agora.io/en/voice-sdk/macos/4.x/API/agorartcenginekit/enableencryption\(_\:encryptionconfig:\)). If there are issues causing failures in data stream encryption or decryption, these can be identified by the newly added `ENCRYPTION_ERROR_DATASTREAM_DECRYPTION_FAILURE` and `ENCRYPTION_ERROR_DATASTREAM_ENCRYPTION_FAILURE` enumerations.

    2. **Other features**

       * A new method [enableEncryptionEx](https://api-ref.agora.io/en/voice-sdk/macos/4.x/API/agorartckit/agorartcenginekit/enableencryptionex\(_\:encryptionconfig\:connection:\)) is added for enabling media stream or data stream encryption in multi-channel use-cases.
       * A new method [setAudioMixingPlaybackSpeed](https://api-ref.agora.io/en/voice-sdk/macos/4.x/API/agorartckit/agorartcenginekit/setaudiomixingplaybackspeed\(_:\)) is introduced for setting the playback speed of audio files.
       * A new method [getCallIdEx](https://api-ref.agora.io/en/voice-sdk/macos/4.x/API/agorartckit/agorartcenginekit/getcallidex\(_:\)) is introduced for retrieving call IDs in multi-channel use-cases.

    3. **Beta features**

       * Speech driven avatar is released in beta. See [beta documentation](https://docs-beta.agora.io/en/realtime-media/voice/reference/release-notes) for details.

    #### Improvements [#improvements-32]

    1. **Audio device type detection**

       This version adds the `deviceTypeName` member to `AgoraRtcDeviceInfo`, used to identify the type of audio devices, such as built-in, USB, HDMI, etc.

    2. **Custom audio capture optimization**

       To enhance the flexibility of custom audio capture, this release deprecates [pushExternalAudioFrameSampleBuffer \[1/2\]](https://api-ref.agora.io/en/voice-sdk/macos/4.x/API/agorartckit/agorartcenginekit/pushexternalaudioframesamplebuffer\(_:\)) and introduces [pushExternalAudioFrameSampleBuffer \[2/2\]](https://api-ref.agora.io/en/voice-sdk/macos/4.x/API/agorartckit/agorartcenginekit/pushexternalaudioframesamplebuffer\(_\:samplerate\:channels\:trackid:\)). Compared to the deprecated method, the new method adds parameters such as `sampleRate`, `channels`, and `trackId`. These support pushing external CMSampleBuffer audio data to the channel via custom audio tracks, and allow for the setting of sample rates and channel counts for external audio sources.

    3. **CPU consumption reduction of in-ear monitoring**

       This release adds an enumerator `AgoraEarMonitoringFilterReusePostProcessingFilter` in `AgoraEarMonitoringFilterType`. For complex audio processing use-cases, you can specify this option to reuse the audio filter after sender-side processing in in-ear monitoring, thereby reducing CPU consumption. Note that this option may increase the latency of in-ear monitoring, which is suitable for latency-tolerant use-cases requiring low CPU consumption.

    4. **Other improvements**

       This version also includes the following improvements:

       * In [AgoraAudioEffectPreset](https://api-ref.agora.io/en/voice-sdk/macos/4.x/API/agorartckit/agoraaudioeffectpreset), a new enumeration `AgoraAudioEffectPresetRoomAcousticsChorus` (chorus effect) is added, enhancing the spatial presence of vocals in chorus use-cases.
       * In [AgoraRtcRemoteAudioStats](https://api-ref.agora.io/en/voice-sdk/macos/4.x/API/agorartckit/agorartcremoteaudiostats), a new `e2eDelay` field is added to report the delay from when the audio is captured on the sending end to when the audio is played on the receiving end.

    #### Issues fixed [#issues-fixed-33]

    This version fixed the following issues:

    * When a user plugged and unplugged a Bluetooth or wired headset once, the audio state change callback `stateChanged` was triggered multiple times.

    #### API changes [#api-changes-14]

    **Added**

    * [setFaceInfoDelegate](https://api-ref.agora.io/en/voice-sdk/macos/4.x/API/agorartckit/agorartcenginekit/setfaceinfodelegate\(_:\))
    * [AgoraFaceInfoDelegate](https://api-ref.agora.io/en/voice-sdk/macos/4.x/API/agorartckit/agorafaceinfodelegate)
    * [onFaceInfo](https://api-ref.agora.io/en/voice-sdk/macos/4.x/API/agorartckit/agorafaceinfodelegate/onfaceinfo\(_:\))
    * [AgoraMediaSourceType](https://api-ref.agora.io/en/voice-sdk/macos/4.x/API/agorartckit/agoramediasourcetype) adds `AgoraMediaSourceTypeSpeechDriven`
    * [AgoraEncryptionConfig](https://api-ref.agora.io/en/voice-sdk/macos/4.x/API/agorartckit/agoraencryptionconfig) adds `datastreamEncryptionEnabled`
    * [AgoraEncryptionErrorType](https://api-ref.agora.io/en/voice-sdk/macos/4.x/API/agorartckit/agoraencryptionerrortype) adds the following enumerations:
      * `ENCRYPTION_ERROR_DATASTREAM_DECRYPTION_FAILURE`
      * `ENCRYPTION_ERROR_DATASTREAM_ENCRYPTION_FAILURE`
    * [AgoraRtcDeviceInfo](https://api-ref.agora.io/en/voice-sdk/macos/4.x/API/agorartckit/agorartcdeviceinfo) adds `deviceTypeName`
    * [AgoraRtcRemoteAudioStats](https://api-ref.agora.io/en/voice-sdk/macos/4.x/API/agorartckit/agorartcremoteaudiostats) adds `e2eDelay`
    * [AgoraErrorCode](https://api-ref.agora.io/en/voice-sdk/macos/4.x/API/agorartckit/agoraerrorcode) adds `AgoraErrorCodeDatastreamDecryptionFailed`
    * [AgoraAudioEffectPreset](https://api-ref.agora.io/en/voice-sdk/macos/4.x/API/agorartckit/agoraaudioeffectpreset) adds `AgoraAudioEffectPresetRoomAcousticsChorus`, enhancing the spatial presence of vocals in chorus use-cases.
    * [getCallIdEx](https://api-ref.agora.io/en/voice-sdk/macos/4.x/API/agorartckit/agorartcenginekit/getcallidex\(_:\))
    * [enableEncryptionEx](https://api-ref.agora.io/en/voice-sdk/macos/4.x/API/agorartckit/agorartcenginekit/enableencryptionex\(_\:encryptionconfig\:connection:\))
    * [setAudioMixingPlaybackSpeed](https://api-ref.agora.io/en/voice-sdk/macos/4.x/API/agorartckit/agorartcenginekit/setaudiomixingplaybackspeed\(_:\))
    * [AgoraEarMonitoringFilterType](https://api-ref.agora.io/en/voice-sdk/macos/4.x/API/agorartckit/agoraearmonitoringfiltertype) adds a new enumeration `AgoraEarMonitoringFilterBuiltInAudioFilters`
    * [pushExternalAudioFrameSampleBuffer \[2/2\]](https://api-ref.agora.io/en/voice-sdk/macos/4.x/API/agorartckit/agorartcenginekit/pushexternalaudioframesamplebuffer\(_\:samplerate\:channels\:trackid:\))

    **Deprecated**

    * [pushExternalAudioFrameSampleBuffer](https://api-ref.agora.io/en/voice-sdk/macos/4.x/API/agorartckit/agorartcenginekit/pushexternalaudioframesamplebuffer\(_:\))

    ### v4.3.0 [#v430-2]

    v4.3.0 was released on February 22, 2024.

    #### Compatibility changes [#compatibility-changes-20]

    This release has optimized the implementation of some functions, involving renaming or deletion of some APIs. To ensure the normal operation of the project, you need to update the code in the app after upgrading to this release.

    1. **Renaming parameters in callbacks**

       In order to make the parameters in some callbacks and the naming of enumerations in enumeration classes easier to understand, the following modifications have been made in this release. Please modify the parameter settings in the callbacks after upgrading to this release.

       | Callback                           | Original parameter name | New parameter name |
       | ---------------------------------- | ----------------------- | ------------------ |
       | `localAudioStateChanged`           | `error`                 | `reason`           |
       | `localVideoStateChanged`           | `error`                 | `reason`           |
       | `onDirectCdnStreamingStateChanged` | `error`                 | `reason`           |
       | `didChangedToState`                | `error`                 | `reason`           |
       | `rtmpStreamingChangedToState`      | `errCode`               | `reason`           |

       | Original enumeration class     | New enumeration class           |
       | ------------------------------ | ------------------------------- |
       | `AgoraAudioLocalError`         | `AgoraAudioLocalReason`         |
       | `AgoraLocalVideoStreamError`   | `AgoraLocalVideoStreamReason`   |
       | `AgoraDirectCdnStreamingError` | `AgoraDirectCdnStreamingReason` |
       | `AgoraMediaPlayerError`        | `AgoraMediaPlayerReason`        |
       | `AgoraRtmpStreamingError`      | `AgoraRtmpStreamingReason`      |

       **Note:** For specific renaming of enumerations, please refer to [API changes](#api-changes).

    2. **Channel media relay**

       To improve interface usability, this release removes some methods and callbacks for channel media relay. Use the alternative options listed in the table below:

       | Deleted methods and callbacks                              | Alternative methods and callbacks  |
       | ---------------------------------------------------------- | ---------------------------------- |
       | * `startChannelMediaRelay`
       * `updateChannelMediaRelay`     | `startOrUpdateChannelMediaRelay`   |
       | - `startChannelMediaRelayEx`
       - `updateChannelMediaRelayEx` | `startOrUpdateChannelMediaRelayEx` |
       | `didReceiveChannelMediaRelayEvent`                         | `channelMediaRelayStateDidChange`  |

    3. **Audio loopback capturing**

       * Before v4.3.0, if you call the [disableAudio](https://api-ref.agora.io/en/voice-sdk/macos/4.x/API/agorartckit/agorartcenginekit/disableaudiospectrummonitor\(\)) method to disable the audio module, audio loopback capturing will not be disabled.
       * As of v4.3.0, if you call the [disableAudio](https://api-ref.agora.io/en/voice-sdk/macos/4.x/API/agorartckit/agorartcenginekit/disableaudiospectrummonitor\(\)) method to disable the audio module, audio loopback capturing will be disabled as well. If you need to enable audio loopback capturing, you need to enable the audio module by calling the [enableAudio](https://api-ref.agora.io/en/voice-sdk/macos/4.x/API/agorartckit/agorartcenginekit/enableaudio\(\)) method and then call [enableLoopbackRecording](https://api-ref.agora.io/en/voice-sdk/macos/4.x/API/agorartckit/agorartcenginekit/enableloopbackrecording\(_\:devicename:\)).

    4. **Log encryption behavior changes**

       For security and performance reasons, as of this release, the SDK encrypts logs and no longer supports printing plaintext logs via the console.

       Refer to the following solutions for different needs:

       * If you need to know the API call status, please check the API logs and print the SDK callback logs yourself.
       * For any other special requirements, please contact [technical support](mailto\:support@agora.io) and provide the corresponding encrypted logs.

    #### New features [#new-features-30]

    1. **Query device score**

       This release adds the [queryDeviceScore](https://api-ref.agora.io/en/voice-sdk/macos/4.x/API/agorartckit/agorartcenginekit/querydevicescore\(\)) method to query the device's score level to ensure that the user-set parameters do not exceed the device's capabilities. For example, in HD or UHD video use-cases, you can first call this method to query the device's score. If the returned score is low (for example, below 60), you need to lower the video resolution to avoid affecting the video experience. The minimum device score required for different business use-cases is varied. For specific score recommendations, please contact [technical support](mailto\:support@agora.io).

    2. **Select different audio tracks for local playback and streaming**

       This release introduces the [selectMultiAudioTrack](https://api-ref.agora.io/en/voice-sdk/macos/4.x/API/agorartckit/agorartcmediaplayerprotocol/selectmultiaudiotrack\(_\:publishtrackindex:\)) method that allows you to select different audio tracks for local playback and streaming to remote users. For example, in use-cases like online karaoke, the host can choose to play the original sound locally and publish the accompaniment in the channel. Before using this function, you need to open the media file through the `openWithMediaSource` method and enable this function by setting the `enableMultiAudioTrack` parameter in [AgoraMediaSource](https://api-ref.agora.io/en/voice-sdk/macos/4.x/API/agorartckit/agoramediasource).

    3. **Others**

       This release has passed the test verification of the following APIs and can be applied to the entire series of RTC 4.x SDK.

       * [setRemoteSubscribeFallbackOption](https://api-ref.agora.io/en/voice-sdk/macos/4.x/API/agorartckit/agorartcenginekit/setremotesubscribefallbackoption\(_:\)): Sets fallback option for the subscribed video stream in weak network conditions.
       * [didRemoteSubscribeFallbackToAudioOnly](https://api-ref.agora.io/en/voice-sdk/macos/4.x/API/agorartckit/agorartcenginedelegate/rtcengine\(_\:didremotesubscribefallbacktoaudioonly\:byuid:\)): Occurs when the subscribed video stream falls back to audio-only stream due to weak network conditions or switches back to the video stream after the network conditions improve.
       * \[setPlayerOption [1/2\]](https://api-ref.agora.io/en/voice-sdk/macos/4.x/API/agorartckit/agorartcmediaplayerprotocol/setplayeroption\(_\:value:\)) and \[setPlayerOption [2/2\]](https://api-ref.agora.io/en/voice-sdk/macos/4.x/API/agorartckit/agorartcmediaplayerprotocol/setplayeroptionstring\(_\:value:\)): Sets media player options for providing technical previews or special customization features.
       * [enableCustomAudioLocalPlayback](https://api-ref.agora.io/en/voice-sdk/macos/4.x/API/agorartckit/agorartcenginekit/enablecustomaudiolocalplayback\(_\:enabled:\)): Sets whether to enable the local playback of external audio source.

    #### Improvements [#improvements-33]

    1. **SDK task processing scheduling optimization**

       This release optimizes the scheduling mechanism for internal tasks within the SDK, with improvements in the following aspects:

       * The speed of video rendering and audio playback for both remote and local first frames improves by 10% to 20%.
       * The API call duration and response time are reduced by 5% to 50%.
       * The SDK's parallel processing capability significantly improves, delivering higher video quality (720P, 24 fps) even on lower-end devices. Additionally, image processing remains more stable in use-cases involving high resolutions and frame rates.
       * The stability of the SDK is further enhanced, leading to a noticeable decrease in the crash rate across various specific use-cases.

    2. **In-ear monitoring volume boost**

       This release provides users with more flexible in-ear monitoring audio adjustment options, supporting the ability to set the in-ear monitoring volume to four times the original volume by calling [setInEarMonitoringVolume](https://api-ref.agora.io/en/voice-sdk/macos/4.x/API/agorartckit/agorartcenginekit/setinearmonitoringvolume\(_:\)).

    3. **Spatial audio effects usability improvement**

       * This release optimizes the design of the [setZones](https://api-ref.agora.io/en/voice-sdk/macos/4.x/API/agorartckit/agorabasespatialaudiokit/setzones\(_:\)) method, supporting the ability to set the `zones` parameter to `NULL`, indicating the clearing of all echo cancellation zones.
       * As of this release, it is no longer necessary to unsubscribe from the audio streams of all remote users within the channel before calling methods in [AgoraLocalSpatialAudioKit](https://api-ref.agora.io/en/voice-sdk/macos/4.x/API/agorartckit/agoralocalspatialaudiokit).

    4. **Local audio state changed callback optimization**

       This release introduces the following enumerations in [AgoraAudioLocalReason](https://api-ref.agora.io/en/voice-sdk/macos/4.x/API/agorartckit/agoraaudiolocalreason), enabling users to obtain more details about local audio errors through the [localAudioStateChanged](https://api-ref.agora.io/en/voice-sdk/macos/4.x/API/agorartckit/agorartcenginedelegate/rtcengine\(_\:localaudiostatechanged\:error:\)) callback:

       * `AgoraAudioLocalReasonNoRecordingDevice`: No recording device is available. Remind your users to check whether the microphone is connected to the device properly in the control plane of the device or if the microphone is working properly.
       * `AgoraAudioLocalReasonNoPlayoutDevice`: No playback device is available. Remind your users to check whether the speaker is connected to the device properly in the control plane of the device or if the speaker is working properly.

    5. **Other Improvements**

       This release also includes the following improvements:

       * This release optimizes the SDK's domain name resolution strategy, improving the stability of calling to resolve domain names in complex network environments.
       * When passing in an image with transparent background as the virtual background image, the transparent background can be filled with customized color.
       * This release adds the `earMonitorDelay` and `aecEstimatedDelay` members in [AgoraRtcLocalAudioStats](https://api-ref.agora.io/en/voice-sdk/macos/4.x/API/agorartckit/agorartclocalaudiostats) to report ear monitor delay and acoustic echo cancellation (AEC) delay, respectively.
       * When using the sound card for recording, it supports capturing audio data in stereo.
       * The [cacheStats](https://api-ref.agora.io/en/voice-sdk/macos/4.x/API/agorartckit/agorartcmediaplayerdelegate/agorartcmediaplayer\(_\:cachestats:\)) callback is added to report the statistics of the media file being cached. This callback is triggered once per second after file caching is started.
       * The [playbackStats](https://api-ref.agora.io/en/voice-sdk/macos/4.x/API/agorartckit/agorartcmediaplayerdelegate/agorartcmediaplayer\(_\:playbackstats:\)) callback is added to report the statistics of the media file being played. This callback is triggered once per second after the media file starts playing. You can obtain information like the audio and video bitrate of the media file.

    #### API changes [#api-changes-15]

    **Added**

    * The `subviewUid` member in [AgoraRtcVideoCanvas](https://api-ref.agora.io/en/voice-sdk/macos/4.x/API/agorartckit/agorartcvideocanvas)
    * The following enumerations in [AgoraAudioLocalReason](https://api-ref.agora.io/en/voice-sdk/macos/4.x/API/agorartckit/agoraaudiolocalreason):
      * `AgoraAudioLocalReasonNoRecordingDevice`
      * `AgoraAudioLocalReasonNoPlayoutDevice`
    * [enableCustomAudioLocalPlayback](https://api-ref.agora.io/en/voice-sdk/macos/4.x/API/agorartckit/agorartcenginekit/enablecustomaudiolocalplayback\(_\:enabled:\))
    * [queryDeviceScore](https://api-ref.agora.io/en/voice-sdk/macos/4.x/API/agorartckit/agorartcenginekit/querydevicescore\(\))
    * The `AgoraMediaSourceTypeCustomVideo` enumeration in [AgoraMediaSourceType](https://api-ref.agora.io/en/voice-sdk/macos/4.x/API/agorartckit/agoramediasourcetype)
    * The `AgoraAudioOutputRoutingBluetoothDeviceA2dp` enumeration in [AgoraAudioOutputRouting](https://api-ref.agora.io/en/voice-sdk/macos/4.x/API/agorartckit/agoraaudiooutputrouting)
    * Adds the `earMonitorDelay` and `aecEstimatedDelay` in [AgoraRtcLocalAudioStats](https://api-ref.agora.io/en/voice-sdk/macos/4.x/API/agorartckit/agorartclocalaudiostats)
    * [selectMultiAudioTrack](https://api-ref.agora.io/en/voice-sdk/macos/4.x/API/agorartckit/agorartcmediaplayerprotocol/selectmultiaudiotrack\(_\:publishtrackindex:\))
    * [cacheStats](https://api-ref.agora.io/en/voice-sdk/macos/4.x/API/agorartckit/agorartcmediaplayerdelegate/agorartcmediaplayer\(_\:cachestats:\))
    * [playbackStats](https://api-ref.agora.io/en/voice-sdk/macos/4.x/API/agorartckit/agorartcmediaplayerdelegate/agorartcmediaplayer\(_\:playbackstats:\))

    **Modified**

    * All `Error` fields in the following enumerations are changed to `Reason`:
      * `AgoraAudioLocalErrorOK`
      * `AgoraAudioLocalErrorFailure`
      * `AgoraAudioLocalErrorDeviceNoPermission`
      * `AgoraAudioLocalErrorDeviceBusy`
      * `AgoraAudioLocalErrorRecordFailure`
      * `AgoraAudioLocalErrorEncodeFailure`
      * `AgoraLocalVideoStreamErrorOK`
      * `AgoraLocalVideoStreamErrorFailure`
      * `AgoraLocalVideoStreamErrorDeviceNoPermission`
      * `AgoraLocalVideoStreamErrorDeviceBusy`
      * `AgoraLocalVideoStreamErrorCaptureFailure`
      * `AgoraLocalVideoStreamErrorCodecNotSupport`
      * `AgoraLocalVideoStreamErrorCaptureInBackGround`
      * `AgoraLocalVideoStreamErrorCaptureMultipleForegroundApps`
      * `AgoraLocalVideoStreamErrorCaptureNoDeviceFound`
      * `AgoraLocalVideoStreamErrorCaptureDeviceDisconnected`
      * `AgoraLocalVideoStreamErrorCaptureDeviceInvalidId`
      * `AgoraDirectCdnStreamingErrorOK`
      * `AgoraDirectCdnStreamingErrorFailed`
      * `AgoraDirectCdnStreamingErrorAudioPublication`
      * `AgoraDirectCdnStreamingErrorVideoPublication`
      * `AgoraDirectCdnStreamingErrorNetConnect`
      * `AgoraDirectCdnStreamingErrorBadName`
      * `AgoraMediaPlayerErrorNone`
      * `AgoraMediaPlayerErrorInvalidArguments`
      * `AgoraMediaPlayerErrorInternal`
      * `AgoraMediaPlayerErrorNoSource`
      * `AgoraMediaPlayerErrorInvalidMediaSource`
      * `AgoraMediaPlayerErrorUnknowStreamType`
      * `AgoraMediaPlayerErrorObjNotInitialized`
      * `AgoraMediaPlayerErrorCodecNotSupported`
      * `AgoraMediaPlayerErrorVideoRenderFailed`
      * `AgoraMediaPlayerErrorInvalidState`
      * `AgoraMediaPlayerErrorUrlNotFound`
      * `AgoraMediaPlayerErrorInvalidConnectState`
      * `AgoraMediaPlayerErrorSrcBufferUnderflow`
      * `AgoraMediaPlayerErrorInterrupted`
      * `AgoraMediaPlayerErrorNotSupported`
      * `AgoraMediaPlayerErrorTokenExpired`
      * `AgoraMediaPlayerErrorUnknown`
      * `AgoraRtmpStreamingErrorOK`
      * `AgoraRtmpStreamingErrorInvalidParameters`
      * `AgoraRtmpStreamingErrorEncryptedStreamNotAllowed`
      * `AgoraRtmpStreamingErrorConnectionTimeout`
      * `AgoraRtmpStreamingErrorInternalServerError`
      * `AgoraRtmpStreamingErrorRtmpServerError`
      * `AgoraRtmpStreamingErrorTooOften`
      * `AgoraRtmpStreamingErrorReachLimit`
      * `AgoraRtmpStreamingErrorNotAuthorized`
      * `AgoraRtmpStreamingErrorStreamNotFound`
      * `AgoraRtmpStreamingErrorFormatNotSupported`
      * `AgoraRtmpStreamingErrorNotBroadcaster`
      * `AgoraRtmpStreamingErrorTranscodingNoMixStream`
      * `AgoraRtmpStreamingErrorNetDown`
      * `AgoraRtmpStreamingErrorInvalidPrivilege`
      * `AgoraRtmpStreamingErrorUnpublishOK`

    **Deleted**

    * `startChannelMediaRelay`
    * `updateChannelMediaRelay`
    * `startChannelMediaRelayEx`
    * `updateChannelMediaRelayEx`
    * `didReceiveChannelMediaRelayEvent`
    * `AgoraChannelMediaRelayEvent`

    ### v4.2.6 [#v426-2]

    v4.2.6 was released on November 17, 2023.

    #### Issues fixed [#issues-fixed-34]

    This release fixed the following issue:

    * When using an iOS 16 or later device with Bluetooth headphones connected before joining the channel, the audio routing after joining the channel was not as expected: Audio was played from the speaker, not the Bluetooth headphones.

    ### v4.2.3 [#v423-2]

    v4.2.3 was released on October 11, 2023.

    #### Improvements [#improvements-34]

    **Other Improvements**

    This release includes the following additional improvements:

    * Optimizes the logic of handling invalid parameters. When you call the `setPlaybackSpeed` method to set the playback speed of audio files, if you pass an invalid parameter, the SDK returns the error code -2, which means that you need to reset the parameter.
    * Optimizes the logic of Token parsing, in order to prevent an app from crash when an invalid token is passed in.

    #### Issues fixed [#issues-fixed-35]

    This release fixed the following issues:

    * Occasional crashes when joining a channel.
    * Occasional failure of joining a channel when the local system time was not set correctly.
    * When calling the `playEffect [3/3]` method to play two audio files using the same `soundId`, the first audio file was sometimes played repeatedly.

    ### v4.2.2 [#v422-2]

    v4.2.2 was released on july 27, 2023.

    #### New features [#new-features-31]

    1. **Wildcard token**

       This release introduces wildcard tokens. Agora supports setting the channel name used for generating a token as a wildcard character. The token generated can be used to join any channel if you use the same user id. In use-cases involving multiple channels, such as switching between different channels, using a wildcard token can avoid repeated application of tokens every time users joining a new channel, which reduces the pressure on your token server. See [Deploy a token server](/en/realtime-media/voice/build/set-up-token-authentication/deploy-token-server#generate-wildcard-tokens).

       <CalloutContainer type="info">
         <CalloutDescription>
           All 4.x SDKs support using wildcard tokens.
         </CalloutDescription>
       </CalloutContainer>

    2. **Preloading channels**

       This release adds `preloadChannelByToken[1/2]` and `preloadChannelByToken[2/2]` methods, which allows a user whose role is set as audience to preload channels before joining one. Calling the method can help shortening the time of joining a channel, thus reducing the time it takes for audience members to hear the host.

       When preloading more than one channels, Agora recommends that you use a wildcard token for preloading to avoid repeated application of tokens every time you joining a new channel, thus saving the time for switching between channels. See [Deploy a token server](/en/realtime-media/voice/build/set-up-token-authentication/deploy-token-server#generate-wildcard-tokens).

    #### Improvements [#improvements-35]

    1. **Virtual Background Algorithm Upgrade**

       This version has upgraded the portrait segmentation algorithm of the virtual background, which comprehensively improves the accuracy of portrait segmentation, the smoothness of the portrait edge with the virtual background, and the fit of the edge when the person moves. In addition, it optimizes the precision of the person's edge in use-cases such as meetings, offices, homes, and under backlight or weak light conditions.

    2. **Channel media relay**

       The number of target channels for media relay has been increased to 6. When calling `startOrUpdateChannelMediaRelay` and `startOrUpdateChannelMediaRelayEx`, you can specify up to 6 target channels.

    #### Issues fixed [#issues-fixed-36]

    This release fixed the following issues:

    * Occasionally, noise occurred when the local user listened to their own and remote audio after joining the channel.
    * Slow channel reconnection after the connection was interrupted due to network reasons.

    #### API changes [#api-changes-16]

    **Added**

    * `preloadChannelByToken [1/2]`
    * `preloadChannelByToken [2/2]`
    * `updatePreloadChannelToken`

    ### v4.2.1 [#v421-2]

    This version was released on June 21, 2023.

    #### Improvements [#improvements-36]

    This version improves the network transmission strategy, enhancing the smoothness of audio interactions.

    #### Fixed Issues [#fixed-issues-3]

    This version fixed the following issues:

    * Inability to join channels caused by SDK's incompatibility with some older versions of AccessToken.
    * After the sending end called `setAINSMode` to activate AI noise reduction, occasional echo was observed by the receiving end.
    * Brief noise occurred while playing media files using the media player.

    ### v4.2.0 [#v420-2]

    v4.2.0 was released on May 24, 2023.

    #### Compatibility changes [#compatibility-changes-21]

    If you use the features mentioned in this section, ensure that you modify the implementation of the relevant features after upgrading the SDK.

    **1. Channel media options**

    * `publishCustomAudioTrackEnableAec` in `AgoraRtcChannelMediaOptions` is deleted. Use `publishCustomAudioTrack` instead.
    * `publishCustomAudioSourceId` in `AgoraRtcChannelMediaOptions` is renamed to `publishCustomAudioTrackId`.

    **2. Virtual sound card**

    As of v4.2.0, Agora supports third-party virtual sound cards. You can use a third-party virtual sound card as the audio input or output device for the SDK. You can use the `stateChanged` callback to see whether the current input or output device selected by the SDK is a virtual sound card.

    <CalloutContainer type="info">
      <CalloutDescription>
        If you set AgoraALD or Soundflower as the default input or output device when joining a channel, you will not hear audio.
      </CalloutDescription>
    </CalloutContainer>

    **3. Miscellaneous**

    * `didApiCallExecute` is deleted. Agora recommends getting the results of the API implementation through relevant channels and media callbacks.
    * `startChannelMediaRelay`, `updateChannelMediaRelay`, `startChannelMediaRelayEx`, and `updateChannelMediaRelayEx` are deprecated. Use `startOrUpdateChannelMediaRelay` and `startOrUpdateChannelMediaRelayEx` instead.

    #### New features [#new-features-32]

    **1. AI Noise Suppression**

    This release introduces public APIs for the AI Noise Suppression function. Once enabled, the SDK automatically detects and reduces background noises. Whether in bustling public venues or real-time competitive arenas that demand lightning-fast responsiveness, this function guarantees optimal audio clarity, providing users with an elevated audio experience. You can enable this function through the newly-introduced `setAINSMode` method and set the noise suppression mode as balance, aggressive, or low latency according to your use-case.

    <CalloutContainer type="info">
      <CalloutDescription>
        Agora charges separately for this function. See [AI Noise Suppression unit pricing](pricing-legacy.md#ai-noise-suppression-pricing).
      </CalloutDescription>
    </CalloutContainer>

    **2. Cross-device synchronization**

    In real-time collaborative singing use-cases, network issues can cause inconsistencies in the downlinks of different client devices. To address this, this release introduces `getNtpWallTimeInMs` for obtaining the current Network Time Protocol (NTP) time. By using this method to synchronize lyrics and music across multiple client devices, users can achieve synchronized singing and lyrics progression, resulting in a better collaborative experience.

    #### Improvements [#improvements-37]

    **1. Voice changer**

    This release introduces the `setLocalVoiceFormant` method that allows you to adjust the formant ratio to change the timbre of the voice. This method can be used together with the `setLocalVoicePitch` method to adjust the pitch and timbre of voice at the same time, enabling a wider range of voice transformation effects.

    **2. Channel media relay**

    This release introduces `startOrUpdateChannelMediaRelay` and `startOrUpdateChannelMediaRelayEx`, allowing for a simpler and smoother way to start and update media relay across channels. With these methods, developers can easily start the media relay across channels and update the target channels for media relay with a single method. Additionally, the internal interaction frequency has been optimized, effectively reducing latency in function calls.

    **3. Custom audio tracks**

    To better meet the needs of custom audio capture use-cases, this release adds `createCustomAudioTrack` and `destroyCustomAudioTrack` for creating and destroying custom audio tracks. Two types of audio tracks are also provided for users to choose from, further improving the flexibility of capturing external audio source:

    * Mixable audio track: Supports mixing multiple external audio sources and publishing them to the same channel, suitable for multi-channel audio capture use-cases.
    * Direct audio track: Only supports publishing one external audio source to a single channel, suitable for low-latency audio capture use-cases.

    #### Issues fixed [#issues-fixed-37]

    This release fixed the following issues:

    * When the host frequently switched the user role between broadcaster and audience in a short period of time, the audience members could not hear the audio of the host.
    * Incorrect information in the `type` field of the return value after calling `getDefaultAudioDevice`.

    #### API changes [#api-changes-17]

    **Added**

    * `startOrUpdateChannelMediaRelay`
    * `startOrUpdateChannelMediaRelayEx`
    * `getNtpWallTimeInMs`
    * `setAINSMode`
    * `createAudioCustomTrack`
    * `destroyAudioCustomTrack`
    * `AudioTrackConfig`
    * `AgoraAudioTrackType`
    * The `domainLimit` and `autoRegisterAgoraExtensions` members in `AgoraRtcEngineConfig`
    * The `channelId` and `uid` parameters in `stateDidChanged` and `informationDidUpdated` callbacks

    **Deprecated**

    * `startChannelMediaRelay`
    * `startChannelMediaRelayEx`
    * `updateChannelMediaRelay`
    * `updateChannelMediaRelayEx`
    * `didReceiveChannelMediaRelayEvent`
    * `AgoraChannelMediaRelayEvent`

    **Deleted**

    * `didApiCallExecute`
    * `publishCustomAudioTrackEnableAec` in `AgoraRtcChannelMediaOptions`

    ### v4.1.1 [#v411-2]

    v4.1.1 was released on February 8, 2023.

    #### New features [#new-features-33]

    **Instant frame rendering**

    This release adds the `enableInstantMediaRendering` method to enable instant rendering mode for audio frames, which can speed up the first audio frame rendering after the user joins the channel.

    #### Issues fixed [#issues-fixed-38]

    This release fixed the issue that playing audio files with a sample rate of 48 kHz failed.

    #### API changes [#api-changes-18]

    **Added**

    `enableInstantMediaRendering`

    ### v4.1.0 [#v410-2]

    v4.1.0 was released on December 15, 2022.

    #### New features [#new-features-34]

    **1. Headphone equalization effect**

    This release adds the `setHeadphoneEQParameters` method, which is used to adjust the low- and high-frequency parameters of the headphone EQ. This mainly useful in spatial audio use-cases. If you cannot achieve the expected headphone EQ effect after calling `setHeadphoneEQPreset`, you can call setHeadphoneEQParameters to adjust the EQ.

    **2. MPUDP (MultiPath UDP) (Beta)**

    As of this release, the SDK supports MPUDP protocol, which enables you to connect and use multiple paths to maximize the use of channel resources based on the UDP protocol. You can use different physical NICs on both mobile and desktop and aggregate them to effectively combat network jitter and improve transmission quality.

    > To enable this feature, contact [support@agora.io](mailto\:support@agora.io).

    **3. Multi-channel management**

    This release adds a series of multi-channel related methods that you can call to manage audio streams in multi-channel use-cases.

    * The `muteLocalAudioStreamEx` method is used to cancel or resume publishing a local audio stream, respectively.
    * The `muteAllRemoteAudioStreamsEx` is used to cancel or resume the subscription of all remote users to audio streams, respectively.
    * The `startRtmpStreamWithoutTranscodingEx`, `startRtmpStreamWithTranscodingEx`, `updateRtmpTranscodingEx`, and `stopRtmpStreamEx` methods are used to implement Media Push in multi-channel use-cases.
    * The `startChannelMediaRelayEx`, `updateChannelMediaRelayEx`, `pauseAllChannelMediaRelayEx`, `resumeAllChannelMediaRelayEx`, and `stopChannelMediaRelayEx` methods are used to relay media streams across channels in multi-channel use-cases.
    * Adds the `leaveChannelEx` \[2/2] method. Compared with the `leaveChannelEx` \[1/2] method, a new `options` parameter is added, which is used to choose whether to stop recording with the microphone when leaving a channel in a multi-channel use-case.

    **4. Client role switching**

    In order to enable users to know whether the switched user role is low-latency or ultra-low-latency, this release adds the `newRoleOptions` parameter to the `didClientRoleChanged` callback. The value of this parameter is as follows:

    * `AgoraAudienceLatencyLevelLowLatency` (1): Low latency.
    * `AgoraAudienceLatencyLevelUltraLowLatency` (2): Ultra-low latency.

    #### Improvements [#improvements-38]

    **1. Relaying media streams across channels**

    This release optimizes the `updateChannelMediaRelay` method as follows:

    * Before v4.1.0: If the target channel update fails due to internal reasons in the server, the SDK returns the error code `AgoraChannelMediaRelayEventUpdateDestinationChannelRefused`(8), and you need to call the `updateChannelMediaRelay` method again.
    * v4.1.0 and later: If the target channel update fails due to internal server reasons, the SDK retries the update until the target channel update is successful.

    **2. Reconstructed AIAEC algorithm**

    This release reconstructs the AEC algorithm based on the AI method. Compared with the traditional AEC algorithm, the new algorithm can preserve the complete, clear, and smooth near-end vocals under poor echo-to-signal conditions, significantly improving the system's echo cancellation and dual-talk performance. This gives users a more comfortable call and live-broadcast experience. AIAEC is suitable for conference calls, chats, karaoke, and other use-cases.

    **Other improvements**

    This release includes the following additional improvements:

    * Reduces the latency when pushing external audio sources.
    * Improves the performance of echo cancellation when using the `AgoraAudioScenarioMeeting` scenario.
    * Enhances the ability to identify different network protocol stacks and improves the SDK's access capabilities in multiple-operator network use-cases.

    #### **Issues fixed** [#issues-fixed-39]

    This release fixed the following issues:

    * After starting and stopping the audio capture device test, there was no sound when the audio playback device was subsequently started.
    * Audience members heard buzzing noises when the host switched between speakers and earphones during live streaming.
    * The call `getExtensionProperty` failed and returned an empty string.

    #### **API changes** [#api-changes-19]

    **Added**

    * `setHeadphoneEQParameters`
    * `muteLocalAudioStreamEx`
    * `muteAllRemoteAudioStreamsEx`
    * `startRtmpStreamWithoutTranscodingEx`
    * `startRtmpStreamWithTranscodingEx`
    * `updateRtmpTranscodingEx`
    * `stopRtmpStreamEx`
    * `startChannelMediaRelayEx`
    * `updateChannelMediaRelayEx`
    * `pauseAllChannelMediaRelayEx`
    * `resumeAllChannelMediaRelayEx`
    * `stopChannelMediaRelayEx`
    * `followEncodeDimensionRatio` in `AgoraCameraCapturerConfiguration`
    * `leaveChannelEx` \[2/2]
    * `newRoleOptions` in `didClientRoleChanged`
    * `adjustUserPlaybackSignalVolumeEx`
    * `enableAudioVolumeIndicationEx`

    **Deprecated**

    * `didApiCallExecute`. Use the callbacks triggered by specific methods instead.

    **Deleted**

    * Removes deprecated member parameters `backgroundImage` and `watermark` in `AgoraLiveTranscoding` class.
    * Removes `AgoraChannelMediaRelayEventUpdateDestinationChannelRefused`(8) in `didReceiveChannelMediaRelayEvent` callback.

    ### v4.0.1 [#v401-2]

    v4.0.1 was released on September 29, 2022.

    #### Compatibility changes [#compatibility-changes-22]

    To improve code usability, this release changes the parameters in optional type in the following classes to basic data types such as ` bool` and `int`:

    * `isAgoraSource` and `isLiveSource` in `AgoraMediaSource` is changed from optional to bool.
    * All parameter types in `AgoraRtcChannelMediaOptions` are changed from `optional` to `bool` or `int`.

    #### New features [#new-features-35]

    **1. In-ear monitoring**

    This release adds support for in-ear monitoring. You can call `enableInEarMonitoring` to enable the in-ear monitoring function.

    After successfully enabling the in-ear monitoring function, you can call `setAudioFrameDelegate` to register the audio observer, and the SDK triggers the `onEarMonitoringAudioFrame` callback to report the audio frame data. You can use your own audio effect processing module to pre-process the audio frame data of the in-ear monitoring to implement custom audio effects. Agora recommends that you choose one of the following two methods to set the audio data format of the in-ear monitoring:

    * Call the `setEarMonitoringAudioFrameParametersWithSampleRate` method to set the audio data format of in-ear monitoring. The SDK calculates the sampling interval based on the parameters in this method, and triggers the `onEarMonitoringAudioFrame` callback based on the sampling interval.
    * Set the audio data format in the return value of the `getEarMonitoringAudioParams` callback. The SDK calculates the sampling interval based on the return value of the callback, and triggers the onEarMonitoringAudioFrame callback based on the sampling interval.

    To adjust the in-ear monitoring volume, you can call `setInEarMonitoringVolume`.

    **2. Local network connection types**

    To make it easier for users to know the connection type of the local network at any stage, this release adds the `getNetworkType` method. You can use this method to get the type of network connection in use, including UNKNOWN, DISCONNECTED, LAN, WIFI, 2G, 3G, 4G, 5G. When the local network connection type changes, the SDK triggers the `networkTypeChangedToType` callback to report the current network connection type.

    **3. Audio stream filter**

    This release introduces filtering audio streams based on volume. Once this function is enabled, the Agora server ranks all audio streams by volume and transports 3 audio streams with the highest volumes to the receivers by default. The number of audio streams to be transported can be adjusted; you can contact [support@agora.io](mailto\:support@agora.io) to adjust this number according to your use-case.

    Meanwhile, Agora supports publishers to choose whether or not the audio streams being published are to be filtered based on volume. Streams that are not filtered will bypass this filter mechanism and transported directly to the receivers. In use-cases where there are a number of publishers, enabling this function helps reducing the bandwidth and device system pressure for the receivers.

    To enable this function, contact [support@agora.io](mailto\:support@agora.io).

    **4. Spatial audio effect**

    This release adds the following features applicable to spatial audio effect use-cases, which can effectively enhance the user's sense of presence experience in virtual interactive use-cases.

    * Sound insulation area: You can set a sound insulation area and sound attenuation parameter by calling `setZones`. When the sound source (which can be a user or the media player) and the listener belong to the inside and outside of the sound insulation area, the listener experiences an attenuation effect similar to that of the sound in the real environment when it encounters a building partition. You can also set the sound attenuation parameter for the media player and the user, respectively, by calling `setPlayerAttenuation` and `setRemoteAudioAttenuation`, and specify whether to use that setting to force an override of the sound attenuation parameter in `setZones`.
    * Doppler sound: You can enable Doppler sound by setting the `enable_doppler` parameter in `SpatialAudioParams`, and the receiver experiences noticeable tonal changes in the event of a high-speed relative displacement between the source and receiver (such as in a racing game use-case).
    * Headphone equalizer: You can use a preset headphone equalization effect by calling the `setHeadphoneEQPreset` method to improve the hearing of the headphones.

    #### API changes [#api-changes-20]

    **Added**

    * `getEarMonitoringAudioParams`

    * `getNetworkType`

    * `isAudioFilterable` in the `ChannelMediaOptions`

    * `setZones`

    * `setPlayerAttenuation`

    * `setRemoteAudioAttenuation`

    * `muteRemoteAudioStream`

    * `SpatialAudioParams`

    * `setHeadphoneEQPreset`

    * `AgoraHeadphoneEQPreset`

    **Deprecated**

    * `startEchoTest` \[2/3]

    ### v4.0.0 [#v400-2]

    v4.0.0 was released on September 15, 2022.

    #### Compatibility changes [#compatibility-changes-23]

    **1. Integration change**

    This release has optimized the implementation of some features, resulting in incompatibility with v3.7.x. The following are the main features with compatibility changes:

    * Multiple channel
    * Media stream publishing control
    * Custom video capture and rendering (Media IO)
    * Warning codes

    After upgrading the SDK, you need to update the code in your app according to your business use-cases. For details, see [Migrate from v3.7.x to v4.0.0](./migration-guide).

    #### New features [#new-features-36]

    **1. Multiple media tracks**

    This release supports one `AgoraRtcEngineKit` instance to collect multiple audio and video sources at the same time and publish them to the remote users by setting `AgoraRtcEngineKit(Ex)` and `AgoraRtcChannelMediaOptions`.

    * After calling `joinChannelByToken` to join the first channel, call `joinChannelExByToken` multiple times to join multiple channels, and publish the specified stream to different channels through different user ID (`localUid`) and `AgoraRtcChannelMediaOptions` settings.

    You can also experience the following features with the multi-channel capability:

    * Publish multiple sets of audio streams to the remote users through different user IDs (`uid`).
    * Mix multiple audio streams and publish to the remote users through a user ID (`uid`).

    **3. Agora media player**

    To make it easier for users to integrate the Agora SDK and reduce the SDK's package size, this release introduces the Agora media player. After calling the `createMediaPlayerWithDelegate` method to create a media player object, you can then call the methods in the `AgoraRtcMediaPlayerProtocol` class to experience a series of functions, such as playing local and online media files, preloading a media file, changing the CDN route for playing according to your network conditions, or sharing the audio and video streams being played with remote users.

    **4. Brand-new AI Noise Suppression**

    The SDK supports a new version of AI noise reduction (in comparison to the basic AI noise reduction in v3.7.x). The new AI noise reduction has better vocal fidelity, cleaner noise suppression, and adds a dereverberation option. To experience this feature, contact [support@agora.io](mailto\:support@agora.io).

    **5. Ultra-high audio quality**

    To make the audio clearer and restore more details, this release adds the `AgoraVoiceBeautifierUltraHighQuality` enumeration. In use-cases that mainly feature the human voice, such as chat or singing, you can call `setVoiceBeautifierPreset` and use this enumeration to experience ultra-high audio quality.

    **6. Spatial audio**

    This feature is in experimental status. To enable this feature, contact [support@agora.io](mailto\:support@agora.io). Contact [Technical Support](mailto\:support@agora.io) if needed.

    You can set the spatial audio for the remote user as following:

    * Local Cartesian Coordinate System Calculation: This solution uses the `AgoraLocalSpatialAudioKit` class to implement spatial audio by calculating the spatial coordinates of the remote user. You need to call `updateSelfPosition` and `updateRemotePosition` to update the spatial coordinates of the local and remote users, respectively, so that the local user can hear the spatial audio effect of the remote user.
      ![Spatial effect](https://assets-docs.agora.io/images/video-sdk/video-call-spatial.png)

    You can also set the spatial audio for the media player as following:

    * Local Cartesian Coordinate System Calculation: This solution uses the `AgoraLocalSpatialAudioKit` class to implement spatial audio. You need to call `updateSelfPosition` and `updatePlayerPositionInfo` to update the spatial coordinates of the local user and media player, respectively, so that the local user can hear the spatial audio effect of media player.
      ![Spatial effect](https://assets-docs.agora.io/images/video-sdk/spatial-audio-effect.png)

    **7. Real-time chorus**

    This release gives real-time chorus the following abilities:

    * Two or more choruses are supported.
    * Each singer is independent of each other. If one singer fails or quits the chorus, the other singers can continue to sing.
    * Very low latency experience. Each singer can hear each other in real time, and the audience can also hear each singer in real time.

    This release adds the `AgoraAudioScenarioChorus` enumeration in `AgoraAudioScenario`. With this enumeration, users can experience ultra-low latency in real-time chorus when the network conditions are good.

    **8. Extensions from the Agora extensions marketplace**

    In order to enhance the real-time audio and video interactive activities based on the Agora SDK, this release supports the one-stop solution for the extensions from the [Agora extensions marketplace](https://console.agora.io/en/agora-extensions-marketplace/):

    * Easy to integrate: The integration of modular functions can be achieved simply by calling an API, and the integration efficiency is improved by nearly 95%.
    * Extensibility design: The modular and extensible SDK design style endows the Agora SDK with good extensibility, which enables developers to quickly build real-time interactive apps based on the Agora extensions marketplace ecosystem.
    * Build an ecosystem: A community of real-time audio and video apps has developed that can accommodate a wide range of developers, offering a variety of extension combinations. After integrating the extensions, developers can build richer real-time interactive functions. For details, see [Use an Extension](../build/customize-audio-processing/use-an-extension).
    * Become a vendor: Vendors can integrate their products with Agora SDK in the form of extensions, display and publish them in the Agora extensions marketplace, and build a real-time interactive ecosystem for developers together with Agora. For details on how to develop and publish extensions, see [Become a Vendor](/en/realtime-media/voice/quickstart).

    **9. Enhanced channel management**

    To meet the channel management requirements of various business use-cases, this release adds the following functions to the `AgoraRtcChannelMediaOptions` structure:

    * Sets or switches the publishing of multiple audio sources.
    * Sets or switches channel profile and user role.
    * Controls audio publishing delay.

    Set `AgoraRtcChannelMediaOptions` when calling `joinChannelByToken` or `joinChannelExByToken` to specify the publishing and subscription behavior of a media stream, for example, whether to subscribe to the audio and video streams of remote users. After joining the channel, call `updateChannelWithMediaOptions` to update the settings in `AgoraRtcChannelMediaOptions` at any time, for example, to switch the published audio sources.

    **11. Subscription allowlists and blocklists**

    This release introduces subscription allowlists and blocklists for remote audio streams. You can add a user ID that you want to subscribe to in your allowlist, or add a user ID for the streams you do not wish to see to your blocklists. You can experience this feature through the following APIs, and in use-cases that involve multiple channels, you can call the following methods in the `AgoraRtcEngineKit(Ex)` interface:

    * `setSubscribeAudioBlacklist`：Set the audio subscription blocklist.
    * `setSubscribeAudioWhitelist`：Set the audio subscription allowlist.

    If a user is added in a blocklist and a allowlist at the same time, only the blocklist takes effect.

    **12. Set audio scenarios**

    To make it easier to change audio scenarios, this release adds the `setAudioScenario` method. For example, if you want to change the audio scenario from `AgoraAudioScenarioDefault` to `AgoraAudioScenarioGameStreaming` when you are in a channel, you can call this method.

    #### Improvements [#improvements-39]

    **1. Fast channel switching**

    This release can achieve the same switching speed as `switchChannelByToken` in v3.7.x through the `leaveChannel` and `joinChannelByToken` methods so that you don't need to take the time to call the `switchChannelByToken` method.

    **2. Voice pitch of the local user**
    This release adds `voicePitch` in `AgoraRtcAudioVolumeInfo` of `reportAudioVolumeIndicationOfSpeakers`. You can use `voicePitch` to get the local user's voice pitch and perform business functions such as rating for singing.

    
  
      
  
      
  
      
  
      
  
      
  
      
  
      
  
      
  
      
  
