-
-
Notifications
You must be signed in to change notification settings - Fork 22k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AudioEffectCapture Produces Distorted Output on 44.1 kHz Input Systems #102701
Comments
4.2.stable is fairly old - can you also reproduce this issue in 4.3.stable and 4.4.beta3? |
Here is a MWP for 4.4.beta3, again the bus layout has 3 buses set up like this: The scene looks like this: And the script is here Resulting audio is broken for 44.1 kHz systems: Hopefully this is useful! |
Is the 44.1 kHz setup using surround sound? In this case, I suggest testing #92532 locally (see Testing pull requests). Typically, I'd also suggest adjusting the capture rate to match the output audio rate, however, Godot already defaults to 44100 Hz output by default, so that's probably not the cause. However, recent changes were made to AudioStreamGenerator to allow it to automatically adjust itself to the input/output mix rate: #102691 |
You can run the project from the editor and it should reproduce the issue, unless you were only able to reproduce the issue in an exported project beforehand. You can also run the project from the project manager with the Run button if you don't want the editor to be running at the same time. |
The problem is that I'm not the one having the issue, but one of my "testers" so yes, I've only tested the bug in build. I'll make them run this version in editor and tell you. |
Tested versions
System information
Windows 10 - 44100 kHz Input Audio
Issue description
I have a bus layout with 3 buses, Master, Muted, Record. Record has a AudioEffectCapture in it and trasfers its audio into Muted which is indeed muted. Then I have an AudioStreamPlayer with an AudioStreamMicrophone.
I press an action (via the input map) to activate and deactivate (play or not play) the Stream in AudioStreamMicrophone. Then, via code I get the buffer like this:
I then save the audio (_accumulated_frames) into a .wav file at the sample rate AudioServer.get_mix_rate(). In systems with 48 kHz input audio this works perfectly. In systems with 44.1 kHz input audio the .wav originated from _accumulated_frames sounds like the audio file attached.
debug_acc_frames.zip
On systems with a 48 kHz input audio rate, the generated .wav file plays back correctly and my posterior speech to text scripts work correctly.
On systems with a 44.1 kHz input audio rate, the resulting .wav file sounds distorted and my posterior speech to text scripts break, see the attached audio file.
Steps to reproduce
Minimal reproduction project (MRP)
See above
The text was updated successfully, but these errors were encountered: