Skip to content
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

No sound on Linux distributions using pavucontrol #16

Open
liquidev opened this issue Nov 15, 2018 · 11 comments
Open

No sound on Linux distributions using pavucontrol #16

liquidev opened this issue Nov 15, 2018 · 11 comments
Labels
bug Something isn't working help wanted Extra attention is needed Linux/Raspberry Pi

Comments

@liquidev
Copy link

When I try to play a sound file, there's no sound at all. pavucontrol doesn't list my sketch as an audio source.

  • OS: Ubuntu 18.10
  • Processing: 3.4
@kevinstadler kevinstadler added the more info needed Further information is requested label Jan 24, 2019
@WysokiStudent
Copy link

WysokiStudent commented May 4, 2019

Same issue here:

  • OS: Archlinux
  • Processing 3.5.3

Uninstalling pavucontrol and its dependencies causes the program to have sound again, however the sound is distorted. The sound seems to be stuttering and it takes more time for the sample to be fully played out in Processing than using mplayer (about twice as long).
Uninstalling pulseaudio (since it sometimes conflicts with direct ALSA usage) neither improves nor makes the situation worse.

import processing.sound.*;

SoundFile soundFile;

void setup() {
  size(800, 600);
  soundFile = new SoundFile(this, "dump_truck.wav");
  soundFile.play();
}

void draw() {
}

Sound sample taken from: http://soundbible.com/1909-Dump-Truck.html
Converted from mp3 to wav using:
ffmpeg -i Dump_Truck-Mike_Koenig.mp3 dump_truck.wav
Using mplayer on dump_truck.wav yields the expected sound.

Removing the draw() function also causes Processing to be silent. Although this function is present in the reference docs it is not stated in the text that it is necessary to overwrite it.

Edit:
The uninstalled packages (along with pavucontrol) are:

  • atkmm-2.28.0-1
  • cairomm-1.12.2-3
  • glibmm-2.60.0-1
  • gtkmm3-3.24.1-1
  • libsigc++-2.10.1-1
  • pangomm-2.42.0-1
  • pavucontrol-1:4.0-1

@kevinstadler kevinstadler changed the title No sound on Linux No sound on Linux distributions using pavucontrol May 6, 2019
@kevinstadler kevinstadler added bug Something isn't working help wanted Extra attention is needed and removed more info needed Further information is requested labels May 6, 2019
@cybergrunge-ops
Copy link

why is there still not a solution to this?!

@robog-two
Copy link

Same issue here? No error, no indication of failure. Upon opening Catia (which shows connections, sources, etc in ALSA) it is not even there. Like the program does not exist, or at least, does not play sound. Hope this helps! :)

@robog-two
Copy link

haha just kidding, it actually does show up, and connects properly to the respective output channels (pictured) yet there is still no sound. (Using SimplePlayback example)
image

@kevinstadler
Copy link
Collaborator

@robog-two could you try calling Sound.list() and copy-pasting the output of the sketch here? I wonder if the problem is that the virtual interface provides a lot of channels, and the output is simply sent to the wrong channel. You could also try selecting the correct output device using the outputDevice() method, maybe ALSA isn't selected as the default.

Also, are you using pavucontrol or is this a general ALSA problem?

@robog-two
Copy link

image

  1. no dice with outputDevice(), though there is an audible pop on the speakers from device 1 (working? sort of?)
    And that was using the sin oscillator
    SinOsc sin = new SinOsc(this); sin.play(200, 0.2); sin = new SinOsc(this); sin.play(205, 0.2);

  2. Pavucontrol is sort of... not the problem. Pavucontrol is actually just the GUI frontend for configuring PulseAudio, and, I actually don't use pulse at all - though I believe it is emulated by PipeWire (and probably that is what Processing is connected to). Catia is actually an interface for the JACK audio subsystem which is why it only shows information gathered from ALSA through JACK. Welcome to linux audio. 💩

Also, seeing as this issue is from 2018 - it is likely a pulse issue since PipeWire wasn't the default in Ubuntu & derivatives until last year, and its emulation is often less buggy than pulse itself, as crazy as that sounds.

  1. From my investigation with Catia (manually forcing the outputs to speakers) audio does not play from any of the outputs it exposed.

@robog-two
Copy link

woah no way, I actually DID have pavucontrol installed? anyways, uninstalled it, same issue listed above

Uninstalling pavucontrol and its dependencies causes the program to have sound again, however the sound is distorted. The sound seems to be stuttering and it takes more time for the sample to be fully played out in Processing than using mplayer (about twice as long).

@robog-two
Copy link

this is the strangest thing I have ever experienced

@robog-two
Copy link

And now sound is gone again when trying the SimplePlayback example, and again again when going back to the sine oscillator.

@kevinstadler
Copy link
Collaborator

So the current state is no sound at all, or distorted sound?

@robog-two
Copy link

Yes, and apparently shifting between the two at random. I wonder if installing or uninstalling pavucontrol restarts a service that may be freeing memory (?) or something similar, thus creating a temporary fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed Linux/Raspberry Pi
Projects
None yet
Development

No branches or pull requests

5 participants