# WhiteAudioEffectMixerBridge Class Reference (/zh-CN/api-reference/whiteboard/whiteboard-sdk/ios/classes/white-audio-effect-mixer-bridge)

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

Whiteboard iOS SDK 2.16.147 公开接口。

@interface WhiteAudioEffectMixerBridge: NSObject

## 成员 [#成员]

- [initWithBridge\:delegate:](/zh-CN/api-reference/whiteboard/whiteboard-sdk/ios/classes/white-audio-effect-mixer-bridge#//api/name/initWithBridge:delegate:)
- [setEffectFinished:](/zh-CN/api-reference/whiteboard/whiteboard-sdk/ios/classes/white-audio-effect-mixer-bridge#//api/name/setEffectFinished:)
- [setEffectSoundId\:stateChanged:](/zh-CN/api-reference/whiteboard/whiteboard-sdk/ios/classes/white-audio-effect-mixer-bridge#//api/name/setEffectSoundId:stateChanged:)
- [setEffectDurationUpdate\:duration:](/zh-CN/api-reference/whiteboard/whiteboard-sdk/ios/classes/white-audio-effect-mixer-bridge#//api/name/setEffectDurationUpdate:duration:)

<a id="//api/name/initWithBridge:delegate:"></a>

### `– initWithBridge:delegate:` [#-initwithbridgedelegate]

<ApiSignature>

\- (instancetype)initWithBridge:(WhiteBoardView *)bridge delegate:(id&lt;WhiteAudioEffectMixerBridgeDelegate&gt;)delegate;

</ApiSignature>

Declared in Displayer/WhiteAudioEffectMixerBridge.h

<a id="//api/name/setEffectFinished:"></a>

### `– setEffectFinished:` [#-seteffectfinished]

<ApiSignature>

\- (void)setEffectFinished:(NSInteger)soundId;

</ApiSignature>

```text
设置音乐播放结束

 @param soundId 播放的音乐 id；
```

Declared in Displayer/WhiteAudioEffectMixerBridge.h

<a id="//api/name/setEffectSoundId:stateChanged:"></a>

### `– setEffectSoundId:stateChanged:` [#-seteffectsoundidstatechanged]

<ApiSignature>

\- (void)setEffectSoundId:(NSInteger)soundId stateChanged:(NSInteger)state;

</ApiSignature>

```text
设置音乐文件播放状态。

 你需要在 Agora RTC SDK 触发的 `rtcEngineDidAudioEffectStateChanged` 回调中调用该方法，将音乐文件播放状态传递给白板中的 PPT。

 PPT 根据收到的音频播放状态判断是否显示画面，以确保音画同步。

*Note:** 如果你使用的实时音视频 SDK 没有该状态回调方法，会导致播放的 PPT 音画不同步。

 @param soundId 播放的音乐 id；
 @param state 音乐文件播放状态：

 - 810: 开始播放音乐。
 - 811: 音乐被暂停。
 - 813: 音乐被停止。
 - 814: 音乐播放失败。
```

Declared in Displayer/WhiteAudioEffectMixerBridge.h

<a id="//api/name/setEffectDurationUpdate:duration:"></a>

### `– setEffectDurationUpdate:duration:` [#-seteffectdurationupdateduration]

<ApiSignature>

\- (void)setEffectDurationUpdate:(NSString *)filePath duration:(NSInteger)duration;

</ApiSignature>

```text
更新 AudioEffect Duration.

 @param filePath 音乐地址；
 @param duration 音乐长度；
```

Declared in Displayer/WhiteAudioEffectMixerBridge.h
