# AudioFocus

### 能力介绍

***

在X2设备中,需要手动调用音频聚焦能力.并在关闭应用时取消焦点.<br>

### Static Member Function Documentation

***

<table data-header-hidden><thead><tr><th width="578"></th><th></th></tr></thead><tbody><tr><td><strong>SetAudioFocusStatus</strong></td><td><br></td></tr><tr><td>bool SetAudioFocusStatus(bool IsRequest)</td><td></td></tr><tr><td>设置音频是否焦点Return  设置是否成功</td><td></td></tr></tbody></table>

<table data-header-hidden><thead><tr><th width="577"></th><th></th></tr></thead><tbody><tr><td><strong>RegistAudioFocusChangeCallBack</strong></td><td><br></td></tr><tr><td>RegistAudioFocusChangeCallBack(Action&#x3C;AudioFocusStatus> call)</td><td></td></tr><tr><td>注册音频焦点改变回调</td><td></td></tr></tbody></table>

<table data-header-hidden><thead><tr><th width="578"></th><th></th></tr></thead><tbody><tr><td><strong>UnRegistAudioFocusChangeCallBack</strong></td><td><br></td></tr><tr><td>void UnRegistAudioFocusChangeCallBack(Action&#x3C;AudioFocusStatus> call)</td><td></td></tr><tr><td>反注册音频焦点改变回调</td><td></td></tr></tbody></table>

<br>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://rayneo.gitbook.io/rayneo-devdoc/x-xi-lie/unity-kai-fa/x2-api-jiu-ban-sdk-zhi-chi/audiofocus.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
