tesselode / kira

Library for expressive game audio.
https://crates.io/crates/kira
Apache License 2.0
855 stars 43 forks source link

Static electricity sound on 3/4 channels, MacOS #50

Closed olegus199 closed 1 year ago

olegus199 commented 1 year ago

Hello! I would like to express my gratitude for this awesome crate. It's the best game sound framework for now. For me, as a musician, it's very comfortable to work with. But, unfortunately, there's a bug while audio is playing.

As you can see on the screenshot that I've attached: Mixer screen there is insane clipping on the PH 3/4 channels. All the audio from the computer goes to the AN1/2 and on the PH 3/4 there is a wild electricity sound with +24 dB clipping. I've noticed it in my own project (a game made with Bevy engine) and decided to create completely new clean project "Hello world" using Kira audio only. And the bug is there too.

Besides the screenshot I'm attaching an audio with that sound, which I've recorded (DON'T PLAY IT LOUDLY):
https://github.com/tesselode/kira/assets/128966780/aa7753ba-e97c-4204-9b9b-36e9da46483b

I get the same sound regardless of different songs that I have played. The sound wave looks like this: Soundwave

After that I've created Cpal basic project (from Cpal's examples folder) to see if the bug came from there. And it turned out, that there is a sound on the 3/4 channel, but it is merely a copy of original sound from the 1/2 channel.

I'll appreciate if you can do anything with it, thanks!

tesselode commented 1 year ago

Hi @olegus199, can you try the zero-out-additional-channels branch and see if the problem persists?

olegus199 commented 1 year ago

Hello! Thanks a lot, I've just tried and it worked! I'm totally satisfied :) Screenshot 2023-06-24 at 22 44 41

tesselode commented 1 year ago

Fixed in v0.8.5.