PromyLOPh / pianobar

Console-based pandora.com player
http://6xq.net/pianobar/
Other
1.74k stars 320 forks source link

Choppy Audio on Ubuntu 18.04 WSL #690

Closed jarussell closed 4 years ago

jarussell commented 4 years ago

Subject of the issue

Audio playback is choppy on the Windows Subsystem for Linux. It takes 3-4 seconds (variable) to play 1 second of music in pianobar. This same behavior is not experienced with cmus, paplay, nor vlc.

Your environment

Steps to reproduce

  1. Install pulseaudio server in Windows by extracting https://github.com/kitor/wsl/blob/master/pulse6.zip to any directory
  2. Add "default-server = 127.0.0.1" to /etc/pulse/client.conf (within the WSL environment)
  3. sudo apt-get install --no-install-recommends libpulse0 pavucontrol pianobar (within the WSL environment)
  4. Start the pulseaudio server on windows (with a flag so that it does not timeout ("--exit-idle-time=-1")
  5. Run pavucontrol to ensure that the pulseaudio server is running and has a device
  6. Play a song with cmus to make sure that pulseaudio is not the problem
  7. Run pianobar, login, and select station

Expected behaviour

Music should play with 1 second lapsing as it plays 1 second's worth of music

Actual behaviour

Music plays, but it plays 1/3-1/4 of a second, pauses for a little bit, and plays another fraction of a second. It takes 3-4 seconds to play 1 actual second of music.

The only error that occurs is "shared memfd open() failed: Function not implemented" but it occurs right before music starts playing (the music still plays, just slowly).

PromyLOPh commented 4 years ago

Are you aware there’s a native Windows port of pianobar available at https://github.com/thedmd/pianobar-windows ?

jarussell commented 4 years ago

I was not aware. It seems like it doesn't really solve the use case that I am looking for because in WSL if I start the windows binary in tmux and detach it to get a headless version like I would on linux, it crashes. I suppose I can report it upstream at WSL.