-
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
CommandQueue full error #66
Comments
You can try to increase the capacities in your |
ah! so it's there. I do this for maximum 10 sounds every frame (120 fps) sound_handle.set_volume(...); |
ok, i found the issue, i am calling the following a lot, for no reason: |
i am reopening because i am getting consistent CommandQueue Errors when connecting to headphones in the mac (bluetooth or wired). When the device connects, is there something inside kira that triggers a bunch of commands? let mut audio_settings = AudioManagerSettings::default();
audio_settings.capacities.command_capacity *= 4; and i don't have anything in my app that responds to new devices being added ps: i am using the 3d emitters if that matters. |
@cybersoulK my guess is that the command queue gets filled up while the audio device reconnects, since nothing consumes the messages from the gameplay thread to the audio thread in that time. I'd recommend not setting volumes and emitter positions every frame - maybe every 100ms or so? Or you can just ignore the errors - once the command queue gets emptied out you should be able to set volumes and emitter positions again without any issue. |
That's likely the reason! Is there a big cost to pay for setting the position of each emitter every frame? And is the command buffer a hardware limit? Even if i ignore error in positions and volumes, there are other parts that might error such as playing/stoping sounds, once it gets full. And if i ignore everything, sounds will not play while they should, which is very evident for very long sounds. Or that or i would need to build a systems on top of kira to cache play/stop instructions and retried them if failed, which is unnecessarily complex. |
The length of the command buffer is determined by the There are a couple of things that could change in Kira to address your concerns:
|
self.spatial_scene.add_emitter(position, emitter_settings)
I am getting a ton of CommandQueue full errors. i have about 10 sounds of 20 seconds length playing.
Is there some kind of limit to the emitter?
ps: i am reusing the same StaticSoundData if that matters
The text was updated successfully, but these errors were encountered: