Skip to content
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

AudioStreamPlayer high-freq artifact, pops, stereo channel corruption #40630

Open
Tracked by #76797
Error7Studios opened this issue Jul 23, 2020 · 5 comments
Open
Tracked by #76797

Comments

@Error7Studios
Copy link

Godot version:
3.2.2 Stable

OS/device including version:
Windows 10

Issue description:

  • High-frequency artifact in both WAV and OGG sample playback. (Related: #23544)
  • Pops/thumps in both WAV and OGG sample playback
  • One stereo channel is messed up on playback of mono OGG sample

Video example:
https://youtu.be/PQQmKecHrec

Steps to reproduce:
(See video example)
In the provided project, drop the samples onto the AudioStreamPlayer, and run the project.
Listen to the output sound.

Minimal reproduction project:
AudioStreamPlayerBug.zip

@Calinou
Copy link
Member

Calinou commented Jul 23, 2020

Related to #22016?

@ellenhp
Copy link
Contributor

ellenhp commented Feb 15, 2021

I was partially able to reproduce this issue in 4.0 but I dug in a bit more and found something interesting. I plotted the OGG and WAV files with matplotlib and it doesn't look like they're the same.

First, the ogg, then the wav.

edit: the ogg was mangled by ffmpeg which is why it looks different. Ignore this.

Screen Shot 2021-02-14 at 11 04 26 PM

Screen Shot 2021-02-14 at 11 05 15 PM

That could explain the awful playback issues in the mono ogg file. I wasn't able to reproduce the high pitched sound you referred to though. I may try some more tomorrow but it's getting late. Might be bedtime :)

@Error7Studios
Copy link
Author

I wasn't able to reproduce the high pitched sound you referred to though.

Good to hear! So I guess something in 4.0 fixed that issue. Thanks for taking a look at it!
As long as WAV and MP3 are working well, then the issue with OGG isn't so critical.

@ellenhp
Copy link
Contributor

ellenhp commented Feb 16, 2021

Nevermind! There was indeed a bug in the mono->stereo conversion of the ogg stream. I have a fix. I also found a fix for some ringing in the ogg/mp3 streams that might be what you noticed, but my hearing isn't great so I don't want to say for sure.

@akien-mga
Copy link
Member

Is this still reproducible in 4.0 RC 3 or later?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants