2026-03-26 16:45:24 +08:00
|
|
|
# AudioSourceComponent::ProcessAudio
|
|
|
|
|
|
2026-04-08 16:07:03 +08:00
|
|
|
**命名空间**: `XCEngine::Components`
|
|
|
|
|
|
|
|
|
|
**类型**: `method`
|
|
|
|
|
|
|
|
|
|
**头文件**: `XCEngine/Components/AudioSourceComponent.h`
|
|
|
|
|
|
|
|
|
|
## 签名
|
2026-03-26 16:45:24 +08:00
|
|
|
|
|
|
|
|
```cpp
|
|
|
|
|
void ProcessAudio(float* buffer, Audio::uint32 sampleCount, Audio::uint32 channels, const Math::Vector3& listenerPosition, const Math::Quaternion& listenerRotation);
|
|
|
|
|
```
|
|
|
|
|
|
2026-04-08 16:07:03 +08:00
|
|
|
## 作用
|
2026-03-26 16:45:24 +08:00
|
|
|
|
2026-04-08 16:07:03 +08:00
|
|
|
更新 `m_samplePosition`。
|
2026-03-26 16:45:24 +08:00
|
|
|
|
2026-04-08 16:07:03 +08:00
|
|
|
## 当前实现
|
2026-03-26 16:45:24 +08:00
|
|
|
|
2026-04-08 16:07:03 +08:00
|
|
|
- 会更新 `m_samplePosition`。
|
|
|
|
|
- 当前实现会调用 `empty`、`Apply3DAttenuation`、`GetChannels`、`size`、`Stop`。
|
2026-03-26 16:45:24 +08:00
|
|
|
|
|
|
|
|
## 相关文档
|
|
|
|
|
|
2026-04-08 16:07:03 +08:00
|
|
|
- [AudioSourceComponent](AudioSourceComponent.md)
|