Files
XCEngine/docs/api/audio/audio-system/set-muted.md
ssdfasd 161a0896d5 docs: 添加 Audio 模块和 Components 模块 API 文档
- 新增 Audio 模块文档 (54 个文件)
  - AudioSystem 单例类及 20 个方法页
  - AudioMixer 混音器类及 11 个方法页
  - IAudioBackend、IAudioEffect 接口
  - FFTFilter、Reverbation、Equalizer、HRTF 效果类
  - WASAPIBackend Windows 后端
  - AudioConfig、Audio3DParams 等结构体
  - 9 个枚举类型文档
- 新增 Components 模块文档 (3 个文件)
  - AudioSourceComponent 音频源组件
  - AudioListenerComponent 音频监听器组件
- 更新 docs/api/main.md 添加模块导航
2026-03-22 01:56:16 +08:00

31 lines
572 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# AudioSystem::SetMuted
设置静音状态。
```cpp
void SetMuted(bool muted);
```
启用或禁用全局静音。静音状态下所有音频输出将被消音。
**参数:**
- `muted` - true 为启用静音false 为禁用静音
**示例:**
```cpp
#include <XCEngine/Audio/AudioSystem.h>
using namespace XCEngine::Audio;
void ToggleMute() {
bool currentlyMuted = AudioSystem::Get().IsMuted();
AudioSystem::Get().SetMuted(!currentlyMuted);
}
```
## 相关文档
- [AudioSystem 总览](audio-system.md)
- [IsMuted](is-muted.md) - 检查静音状态