A Weird Imagination

Volume via shell

Posted in

The problem#

Sometimes a GUI is not the best way to control a computer's volume. Usually if you care about the volume of your computer, you're probably nearby but perhaps would rather be using a remote or other shortcut way of changing the volume. The specific use case that prompted this blog post was binding the volume up and volume down keys on my keyboard to the global volume control (as opposed to separately binding them in each application).

Read more…

Application bypassing PulseAudio

Posted in

The problem#

Recently I ran a game1 and instead of the expected music, got distorted noise. At first I thought there was something physically wrong with my speakers or the connection to them, but running any other program resulted in normal sound, albeit mixed with the distorted sound of the game. Even more strangely, changing the volume in the game changed the volume of the distorted noise, implying the game was in fact generating the right thing but it was being misinterpreted, so the culprit was neither the game nor the sound driver but somewhere in between them.

As I had recently set up PulseAudio2, I suspected it was to blame. I opened up pavucontrol to find the game omitted from the list of applications producing sound, which suggested the problem was caused by the game trying to use some way to produce sound that PulseAudio was not capturing.

The solution#

The short version is that the problem was solved by restarting PulseAudio:

$ killall -9 pulseaudio

Read more…