docs: update resources API docs

This commit is contained in:
2026-03-20 02:35:35 +08:00
parent fd792b7df1
commit ea756c0177
314 changed files with 9439 additions and 1360 deletions

View File

@@ -0,0 +1,36 @@
# AudioClip::Release
```cpp
void Release()
```
释放音频资源,释放存储的音频数据并清除 RHI 资源引用。
## 详细描述
调用此方法后:
1. 清除音频数据(调用 `m_audioData.Clear()`
2. 将 RHI 资源引用置为 `nullptr`
3.`m_isValid` 标记为 `false`
## 参数
## 返回值
## 示例
```cpp
ResourceHandle<AudioClip> sfx = ResourceManager::Get().Load<AudioClip>("sounds/explosion.wav");
sfx->Release();
if (!sfx->IsValid()) {
// 音频已释放
}
```
## 相关文档
- [AudioClip 总览](audioclip.md) - 返回类总览