30 lines
642 B
Markdown
30 lines
642 B
Markdown
|
|
# AudioSystem::UnregisterSource
|
||
|
|
|
||
|
|
注销音频源。
|
||
|
|
|
||
|
|
```cpp
|
||
|
|
void UnregisterSource(Components::AudioSourceComponent* source);
|
||
|
|
```
|
||
|
|
|
||
|
|
将音频源组件从音频系统注销。已注销的音频源将不再被处理和混音。
|
||
|
|
|
||
|
|
**参数:**
|
||
|
|
- `source` - 要注销的 AudioSourceComponent 指针
|
||
|
|
|
||
|
|
**示例:**
|
||
|
|
|
||
|
|
```cpp
|
||
|
|
#include <XCEngine/Audio/AudioSystem.h>
|
||
|
|
|
||
|
|
using namespace XCEngine::Audio;
|
||
|
|
|
||
|
|
void UnregisterAudioSource(Components::AudioSourceComponent* audioSource) {
|
||
|
|
AudioSystem::Get().UnregisterSource(audioSource);
|
||
|
|
}
|
||
|
|
```
|
||
|
|
|
||
|
|
## 相关文档
|
||
|
|
|
||
|
|
- [AudioSystem 总览](audio-system.md)
|
||
|
|
- [RegisterSource](register-source.md) - 注册音频源
|