zevv / bucklespring

Nostalgia bucklespring keyboard sound
GNU General Public License v2.0
1.39k stars 82 forks source link

All media playback halts while bucklespring is running #92

Closed OoLunar closed 3 years ago

OoLunar commented 3 years ago

Hello! Wonderful program you have going here. Not only does it make me feel slightly more productive, it annoys the hell out of my family! Two birds with one stone!

In all seriousness, I've noticed that I'm not able to listen to any audio related things. Not with VLC, FireFox or anything alike. It blocks both output and input, with exception to the keyboard sounds. With bucklespring disabled, I can play multiple things at once, like Youtube and VLC.

In order to get bucklespring working, I had to modify the LD_LIBRARY_PATH and LIBRARY_PATH environment variables located in ~/.bashrc.

export LD_LIBRARY_PATH=/usr/local/lib/native_client.amd64.cpu.linux:/usr/local/lib:/usr/lib:/lib:/usr/lib/x86_64-linux-gnu/
export LIBRARY_PATH=/usr/local/lib/native_client.amd64.cpu.linux:/usr/local/lib:/usr/lib:/lib:/usr/lib/x86_64-linux-gnu/

I also added the following option to my /etc/modprobe.d/alsa-base.conf

options snd-hda-intel index=-2

Here's the verbose output of me switching from youtube to VLC to doing a few bash related tasks, if you find it helpful: https://hastebin.com/yiqaleyigi.properties

I'm not sure if this is related to bucklespring in particular, or OpenAL. I've noticed that you've pointed quite a bit of previous issues to them, which is understandable.

It blocks both output and input, with exception to the keyboard sounds.

Good news is, now I can finally get the FBI to stop listening to me singing cringy anime openings! :smiley:

I'll help you in anyway that I can, if you can bear with my humor.

zevv commented 3 years ago

Hmm, this indeed seems to be an OpenAL issue. Your openAL is likely configured to talk directly to the alsa hardware device, effectively locking it out for any other users. On a common desktop Linux, you'll likely be using Pulseaudio as your audio backend, so OpenAL needs to be configured to use the pulse driver to play nicely with the rest of the system.

OoLunar commented 3 years ago

Sounds easy like an easy fix. Do you happen to have any docs you can recommend, or should I go Google up some StackOverflow posts?

zevv commented 3 years ago

Try this:

drivers = pulse
period_size = 8
periods = 4

The period_size and periods args are not strictly necessary, but help lower the latency.

OoLunar commented 3 years ago

I put those in my ~/.alsoftrc, stopped and restarted the buckle binary. Everything still worked just as before; input and output is blocked except for keyboard sounds.

zevv commented 3 years ago

Hm not sure how to go from here. As bucklespring does nothing with alsa or sound itself, but only delegates to OpenAL, I recommend asking for help at the OpenAL community, they should be able to figure out how to get this fixed.

Good luck, let me know if you have a solution so I can put it in the docs!

zevv commented 3 years ago

Oh wait, did you put the above in the section [general] ?

OoLunar commented 3 years ago

Apologies for the delay.

My ~/alsoftrc was empty before you gave me those settings. I wasn't aware it was supposed to be prefilled with things. Maybe there's another one somewhere in my .configs directory...

Anywho, I'll head on over to the OpenAL community and report back what solution they gave me. Thank you for your support!

zevv commented 3 years ago

"> Buckle is having user permission issues accessing /dev/input/event* files"

Add yourself to the "input" group should fix that on ubunu/debian.

zevv commented 3 years ago

Btw, why are you using the libinput method anyway, is the normal X11 setup no working for you?

OoLunar commented 3 years ago

Turns out there were multiple issues with what I was doing:

Adding my user to the input group did fix the permissions issue. Everything is running as intended.

Btw, why are you using the libinput method anyway, is the normal X11 setup not working for you?

I currently am running Ubuntu 20.04, which uses Wayland. Even though I have Cinnamon DE installed, I'm not sure if it's the Wayland version or not. I switch DE's often and wanted a general solution no matter which DE I used.

Thank you for your time, and I appreciate the project!