feat(audio): add pitch control to audio sources

Implement set_pitch method that clamps pitch between 0.0 and 1.0 and applies it via AL_PITCH. Includes minor whitespace cleanup in audio_engine.cpp.
This commit is contained in:
2026-07-08 11:03:10 +08:00
parent 61a9fdac32
commit 44f83142ed
3 changed files with 9 additions and 1 deletions

View File

@@ -17,7 +17,7 @@ public:
void set_buffer_3d(const AudioBuffer& buffer, const glm::vec3& vec3);
void set_loop(bool on = true);
void set_volume(float volume);
void set_pitch(float pitch);
void play();
void play_2d(const AudioBuffer& buffer);
void play_3d(const AudioBuffer& buffer, const glm::vec3& pos);