audio: extract mix render block from update

This commit is contained in:
2026-04-14 16:42:25 +08:00
parent 3e56757910
commit ee03f7035b
3 changed files with 158 additions and 100 deletions

View File

@@ -51,6 +51,7 @@ public:
void SetSpeedOfSound(float metersPerSecond);
float GetSpeedOfSound() const { return m_speedOfSound; }
void RenderAudio(float* buffer, uint32 frameCount, uint32 channels, uint32 sampleRate);
void ProcessAudio(float* buffer, uint32 frameCount, uint32 channels);
void SetListenerTransform(const Math::Vector3& position, const Math::Quaternion& rotation);
@@ -79,6 +80,7 @@ private:
AudioSystem& operator=(const AudioSystem&) = delete;
void ProcessSource(Components::AudioSourceComponent* source, float* buffer, uint32 frameCount, uint32 channels, uint32 sampleRate);
void RenderAudioBlock(uint32 frameCount, uint32 channels, uint32 sampleRate);
private:
std::unique_ptr<IAudioBackend> m_backend;