# AudioSourceComponent::SetVolume **命名空间**: `XCEngine::Components` **类型**: `method` **头文件**: `XCEngine/Components/AudioSourceComponent.h` ## 签名 ```cpp void SetVolume(float volume); ``` ## 作用 更新 `m_volume`。 ## 当前实现 - 会更新 `m_volume`。 - 当前实现会调用 `max`、`min`。 ## 相关文档 - [AudioSourceComponent](AudioSourceComponent.md) - [GetVolume](GetVolume.md)