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

Glitch encountered when using spatialized audio #885

Open
foxtacles opened this issue Aug 8, 2024 · 4 comments
Open

Glitch encountered when using spatialized audio #885

foxtacles opened this issue Aug 8, 2024 · 4 comments

Comments

@foxtacles
Copy link

foxtacles commented Aug 8, 2024

Issue was originally reported in source repository, but adding it here for visibility - also curious if this issue can be reproduced by others.

I've noticed a "crackling" sound artifact in a few cases when spatialization is enabled. Here's a video with the sound artifact:

LEGO.2024-06-08.18-13-24.mp4

I've set up a minimally reproducible example app for this issue here:

hospital.zip

It would seem the problem is related to the fact that the "siren" sound is set to have a high volume:

ma_sound_set_volume(&siren, 0.984011f); // must be high

However, the issue is not present when spatialization is disabled.

@ethindp
Copy link

ethindp commented Aug 23, 2024

I've noticed this too. With a simple sine wave at 200Hz looping from an in-memory stream I notice a slight crackling when the sound loops.

@foxtacles
Copy link
Author

@mackron did you have a chance to try to reproduce it, or any idea what the problem might be? Unfortunately this issue affects a number of sounds used in our project, so would love to figure this out. Other than this issue miniaudio is a perfect fit for us. Thanks!

@mackron
Copy link
Owner

mackron commented Dec 17, 2024

I haven't forgotten about this one, just haven't a chance to properly sit down and investigate it. Same for many other outstanding issues here.

@ethindp Your issue is different. Yours is almost certainly due to the start and end of the sound not being contiguous. If you're absolutely certain that's not the case feel free to open a separate ticket.

@Ramen2X
Copy link

Ramen2X commented Dec 19, 2024

I can confirm that I can reproduce this as well on all three major desktop operating systems. Tested and reproduced on Windows x86_64, macOS ARM64, and Linux x86_64.

For the sake of being comprehensive, here's a cross-platform version of @foxtacles' test app that only uses POSIX calls and should compile cleanly on macOS and Linux.
hospital-posix.zip

Thanks so much for your work!

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

No branches or pull requests

4 participants