godotengine / godotengine/godot
Playing multiple AudioStreams together causes alterations of pitch or volume
- Dominant language
- C++
- Stars
- 117k
- Forks
- 26.8k
- PR merge metrics
- PR metrics pending
Description
### Tested versions
- Reproducible in v4.4.1.stable.mono.official [49a5bc7b6]
- Reproducible in v4.3.stable.mono.official [77dcf97d8]
- Reproducible in v4.2.1.stable.mono.official [b09f793f5]
### System information
Godot v4.4.1.stable.mono - Windows 11 (build 26100) - Multi-window, 1 monitor - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 2080 Super with Max-Q Design (NVIDIA; 32.0.15.7688) - Intel(R) Core(TM) i7-10875H CPU @ 2.30GHz (16 threads)
Godot v4.3.stable.mono - Windows 10.0.22631 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 2080 Super with Max-Q Design (NVIDIA; 32.0.15.6081) - Intel(R) Core(TM) i7-10875H CPU @ 2.30GHz (16 Threads)
### Issue description
This audio bug is hard to spot. When multiple AudioStreamPlayers play different AudioStreams, the pitch or volume of certain frequencies of the AudioStream get altered.
I've provided a video below to show the issue better.
https://github.com/user-attachments/assets/11866800-dc11-4011-97f2-3ee54e52349f
In the video, a brownian noise is played constantly, with no major change in pitch or volume. When a pluck sound effect is played, however, you can hear the timbre/pitch of the brownian noise get very slightly altered.
### Steps to reproduce
1. Start with a scene of your liking
2. Add two AudioStreamPlayers
3. Add two AudioStreams to the Players. (I recommend using a constant audio sample and a short sound effect, like a pluck)
4. Play the AudioStreamPlayers, and make sure both AudioStreams are audible at the same time
5. Try to spot the alteration in audio/volume
### Minimal reproduction project (MRP)
[audio-pitch-issue.zip](https://github.com/user-attachments/files/16789278/audio-pitch-issue.zip)
This is the same project I've used in the video. To replicate the issue, simply set the "playing" property of the first AudioStreamPlayer to True, and then do the same to the second one. The bug happens both in editor and in the running application.
Contributor guide
Research direction
Start with the attached audio-pitch-issue.zip minimal reproduction project and reproduce simultaneous playback of the two AudioStreamPlayers in both the editor and running application. Compare the constant sample while triggering the short sound effect; done means concurrent AudioStreams no longer produce audible pitch, timbre, or volume alterations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- audio-video-rtc
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100