Skip to content

No sound on Linux distributions using pavucontrol #16

Description

@liquidev

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

Activity

  1. WysokiStudent commented on May 4, 2019

    @WysokiStudent

    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
  2. changed the title [-]No sound on Linux[/-] [+]No sound on Linux distributions using pavucontrol[/+] on May 6, 2019
  3. added
    bugSomething isn't working
    help wantedExtra attention is needed
    and removed
    more info neededFurther information is requested
    on May 6, 2019
  4. cybergrunge-ops commented on Sep 5, 2021

    @cybergrunge-ops

    why is there still not a solution to this?!

  5. robog-two commented on Sep 2, 2022

    @robog-two

    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! :)

  6. robog-two commented on Sep 2, 2022

    @robog-two

    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

  7. kevinstadler commented on Sep 4, 2022

    @kevinstadler
    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?

  8. robog-two commented on Sep 4, 2022

    @robog-two

    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.
  9. robog-two commented on Sep 4, 2022

    @robog-two

    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).

  10. robog-two commented on Sep 4, 2022

    @robog-two

    this is the strangest thing I have ever experienced

  11. robog-two commented on Sep 4, 2022

    @robog-two

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

  12. kevinstadler commented on Sep 6, 2022

    @kevinstadler
    Collaborator

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

  13. robog-two commented on Sep 6, 2022

    @robog-two

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions