33 lines
719 B
Markdown
33 lines
719 B
Markdown
|
|
# StartEnergyDetect
|
||
|
|
|
||
|
|
**所属类**: `AudioSourceComponent`
|
||
|
|
|
||
|
|
**头文件**: `XCEngine/Components/AudioSourceComponent.h`
|
||
|
|
|
||
|
|
**描述**: 开始音频能量检测。
|
||
|
|
|
||
|
|
## 函数签名
|
||
|
|
|
||
|
|
```cpp
|
||
|
|
void StartEnergyDetect();
|
||
|
|
```
|
||
|
|
|
||
|
|
## 使用示例
|
||
|
|
|
||
|
|
```cpp
|
||
|
|
#include <XCEngine/Components/AudioSourceComponent.h>
|
||
|
|
|
||
|
|
using namespace XCEngine::Components;
|
||
|
|
|
||
|
|
void BeginEnergyDetection(AudioSourceComponent* source) {
|
||
|
|
source->StartEnergyDetect();
|
||
|
|
}
|
||
|
|
```
|
||
|
|
|
||
|
|
## 相关文档
|
||
|
|
|
||
|
|
- [AudioSourceComponent](./audio-source-component.md) - 音频源组件
|
||
|
|
- [StopEnergyDetect](./stop-energy-detect.md) - 停止能量检测
|
||
|
|
- [IsEnergyDetecting](./is-energy-detecting.md) - 检查是否正在检测
|
||
|
|
- [GetEnergy](./get-energy.md) - 获取当前能量值
|