-
Notifications
You must be signed in to change notification settings - Fork 50
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
Pop sound on init under linux #121
Comments
I'm not able to replicate this using a simple example: use std::{error::Error, io::stdin};
use kira::{
sound::{static_sound::StaticSoundData, streaming::StreamingSoundData},
AudioManager, AudioManagerSettings, DefaultBackend,
};
fn main() -> Result<(), Box<dyn Error>> {
let mut manager = AudioManager::<DefaultBackend>::new(AudioManagerSettings::default())?;
manager.play(StreamingSoundData::from_file("01.mp3")?)?;
stdin().read_line(&mut "".into())?;
Ok(())
} I'm using the same mp3 that I'm hearing in the video. I'm on Arch using PulseAudio (I think). |
It seems to be related again to the spatial sounds we have on our map. When we defer the loading of our spatial sound files (not playng! just loadin!), to when the window is visible, the "pop" sound dissappears (as referenced in the draft PR we have open in our project). Very odd cause and effect relationship of the bug. |
When are spatial sounds loaded and played otherwise? I wasn't able to reproduce the pop by playing the music in a spatial sub track. |
Program now waits for the graphics engine init and window to become visible and renders the first frame. For each frame then:
When we defer the loading of the ambient sounds, so that while the first frame is rendered the ambient sound files are still loading in the async thread, then the pop disappears. The first frame would only start the playback of the BGM track and at later frames, when the ambient sounds have been loaded, would start the playback of the ambient , spatial sounds (two ambient sounds of birds are in range of the camera location of the main menu). On the other hand, if we remove the defered loading and make sure the ambient sound haves been fully loaded, then the ambient, spatial sounds of the birds and the BGM will start to play at the same frame. In this case the "pop" can be heard on linux systems. (I can provide you with a test setup of our client if you want. Please write me a PM over discord if you want to have the needed files.) |
Some of our users report, that on linux (current fedora linux in their case), the sound system has a "pop" sound playing when the on init. I attached a screen recording that contains the "pop" sound. The "pop" sound seems to have been occuring for them since we updated from kira 0.9 to kira 0.10.
It only manifests on linux systems (they use alsa). On windows / mac we can't reproduce the issue. Do you have any idea, how this "pop" sound could be generated? The BGM that plays at the start is a sound stream.
sound-pop-init.mp4
The text was updated successfully, but these errors were encountered: