refactor(docs): add AudioListenerComponent IsMute method doc
This commit is contained in:
40
docs/api/components/audio-listener-component/is-mute.md
Normal file
40
docs/api/components/audio-listener-component/is-mute.md
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
# IsMute
|
||||||
|
|
||||||
|
**所属类**: `AudioListenerComponent`
|
||||||
|
|
||||||
|
**头文件**: `XCEngine/Components/AudioListenerComponent.h`
|
||||||
|
|
||||||
|
**描述**: 检查音频监听器是否处于静音状态。
|
||||||
|
|
||||||
|
## 函数签名
|
||||||
|
|
||||||
|
```cpp
|
||||||
|
bool IsMute() const;
|
||||||
|
```
|
||||||
|
|
||||||
|
## 返回值
|
||||||
|
|
||||||
|
| 类型 | 描述 |
|
||||||
|
|------|------|
|
||||||
|
| `bool` | 静音状态,true 表示静音,false 表示非静音 |
|
||||||
|
|
||||||
|
## 使用示例
|
||||||
|
|
||||||
|
```cpp
|
||||||
|
#include <XCEngine/Components/AudioListenerComponent.h>
|
||||||
|
|
||||||
|
using namespace XCEngine::Components;
|
||||||
|
|
||||||
|
void CheckMuteStatus(AudioListenerComponent* listener) {
|
||||||
|
if (listener->IsMute()) {
|
||||||
|
printf("Audio is muted\n");
|
||||||
|
} else {
|
||||||
|
printf("Audio is not muted\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## 相关文档
|
||||||
|
|
||||||
|
- [AudioListenerComponent](./audio-listener-component.md) - 音频监听器组件
|
||||||
|
- [SetMute](./set-mute.md) - 设置静音状态
|
||||||
Reference in New Issue
Block a user