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
Pulse Audio Exception - Hard to Reproduce #952
Comments
After looking at the system info, I realized I didn't have OpenAL installed - so I did. Obviously, this is a work around, but I did notice everything sounded better (the distance from player seemed to work better). |
Could you please you post the following?
Although the issue you linked was closed in 2020, the fix might not be shipped on older LTS versions. |
Please forgive my ignorance on AVbin ... can you tell me how to check ? |
My apologies, I think there was a misunderstanding:
The contradictory docstring at the top of the PulseAudio binding is also concerning. Combined with the issues you linked, it's probably good starting point for investigating this further: pyglet/pyglet/media/drivers/pulse/lib_pulseaudio.py Lines 1 to 10 in 66466f8
I'm not familiar with audio and am unsure if I'll be able to fix this.
A workaround may be better than nothing, especially if the required packages are widely available. Documenting them and the setup steps would be a decent short-term solution. Could you please re-run the pyglet system info command and confirm the following?
|
On further thought, this behavior seems understandable in the context of debugging and other reports of the same error. It may be an underflow caused by debugging or loss of sync:
pyglet/pyglet/media/drivers/pulse/interface.py Lines 502 to 509 in 66466f8
2. Debugging can do odd things to programs that aren't built to account for odd jumps in time 3. On resuming or loss of sync, pyglet's abstraction could try to fetch nonexistent data due to the time data being stale I think you've also revealed why I've never run into this issue despite contributing to arcade for years on Linux: I've been using OpenAL the whole time. pyglet.media
------------------------------------------------------------------------------
audio driver: <pyglet.media.drivers.openal.adaptation.OpenALDriver object at 0x7f8929cdb430> Interestingly, this user reported that installing PipeWire with a PulseAudio adapter layer also fixed the problem. To me, this reads as one of the following:
I could try to install or switch to a PulseAudio adapter layer to replicate this issue, but it might be pointless. |
|
@pushfoo - Indeed! I wasn't particularly interested in Pulse, I just didn't have OpenAL on this box. Just for the sake of anybody who finds this later... I ran this command to install OpenAL
|
AVbin hasn't been part of pyglet for a while. I personally haven't had experience with PulseAudio, just OpenAL, Xaudio2, and DirectSound. I do know PulseAudio is probably one of the oldest drivers. |
This was already corrected in this comment, my apologies.
Are you sure you need need the $ dpkg -l | grep openal
ii libopenal-data 1:1.19.1-2 all Software implementation of the OpenAL audio API (data files)
ii libopenal1:amd64 1:1.19.1-2 amd64 Software implementation of the OpenAL audio API (shared library) Either way, I think the doc solution is the best short-term option for arcade, if not pyglet. Thank you for reporting this and continuing to help with investigating it. Even though it looks like one of the lead pyglet maintainers is already aware, the PulseAudio issues could still take a while to get resolved. Race condition bugs aren't really fun to deal with, especially when the easy workaround is to use an audio backend already present on many distros. |
@pushfoo I tend to install the -dev version of stuff by default old habit - you just never know when you want to tweak something. |
I think it would make sense for anyone looking to develop pyglet with a focus on audio. Have you worked with Sphinx before? |
@pushfoo no, I haven't. I'm old though ;). I had a few games published for the Playstation 1 in the late 1990s. These days I usually have guys working for me. I'm writing a zombie game for a five-year-old child of a good friend I know that loves Zombies. :) |
Ah, it's a documentation library! |
One thing you can do as well, is enable media debugging via |
Your experience with tech hype cycles means you'll be ready Arcade's recent git history demonstrates the downside of Sphinx: it's powerful, yet unintuitive at best and painful at worst. However, it's probably nothing compared to the PS1 optimization and disc layout stories I've heard. :P I'd welcome your input on either of the referencing issues linked above, or any other arcade issues. Knowledge of OOP and abstraction pitfalls from the past would be helpful to avoid repeating them.
Thank you for pointing that out. I'll include this in the arcade doc as well. As to pyglet, what's your recommendation for how to proceed? Doc for now, full fix later? |
Highlights from a brief Discord discussion with Square789:
|
I would go ahead and give the latest version a try as there has been a big rework in the audio engine (2.0.14b). Hopefully that clears up the issue, if not let us know. If we haven't heard back we will assume this is stale and close this issue. |
Describe the bug
I'm using Python Arcade 3.0.0.dev25 and Pyglet 2.0.0.9. Randomly (usually when I pause a lot when debugging, but also when I've been running the game for a while) I get the following exception thrown:
Assertion 'q->front' failed at pulsecore/queue.c:81, function pa_queue_push(). Aborting.
The bug is clearly in pulse audio. It was listed as a "closed issue": mackron/miniaudio#235
And fixed here:
mackron/miniaudio@50c9081
System Information:
How To Reproduce
This is the code I've written to start the sound most of the time. When a sprite triggers an action (i.e. starts walking) if the player sprite is close enough, the sound turns on. This code snippet is typical of when I load or turn on sound. Typically there are two sounds playing when the exception happens.
The text was updated successfully, but these errors were encountered: