-
Notifications
You must be signed in to change notification settings - Fork 823
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
Request for help for audio output. #2658
Comments
Pulseaudio 8 works great on Fall Creators Update. You need the patched libpulse0 in order to make it work (from #486 thanks to @therealkenc). I just tested it yesterday and mplayer works with these steps:
|
Hi @ultrasound1372. Yours is the "except one" use case I was alluding to in #1006 (message), and curiously overlooked in the August 09, 2016 WP Dev response "but what developer scenario" over in the User Voice ticket. Surprised it took this long to come up, and it seemed like cheating to do it myself. Now that it has, I would not be surprised if priority for the feature improves markedly (if I know my big companies right). The details are in #486, but it sounds like you've found and followed the info over there about right. Per onomatopellan above it does work; though I haven't run it personally in ages despite being therealkenc in that PPA. There isn't much concrete I can offer as to why it is not working for you. Try Ono's steps above and if it still doesn't work it will boil down to debugging why you are getting connection refused errors. Which is more of a "networking thing" rather than an "audio thing". First step would be to use |
Ono's link works here (note it is split on two lines), but I just made a tiny url which might be easier.
|
Begin edit: I ran netstat, it never seems to complete, just loops, and because I cannot see I cannot check for that. Tried redirecting to a text file, became 4KB before I terminated it, ctrl f, 4713, nothing found. So I guess it isn't listening. Executing paplay on the windows side returns connection refused... Maybe it has something to do with this line at the very bottom of the pulseaudio output? |
That error is on the Windows (ie server) side? Yeah that sounds like a problem. The
Which is almost certainly going to come up empty. |
errp... Looked up that error and immediately got to wsl and pulseaudio bridging, fall creator's update has broken it completely they say and no fix has been provided for that error. Although he wqas getting all kinds of errors with waveout so... Let me try their workaround. |
That is normal, I also see that line on Windows and it works. On the Windows side, in default.pa I modified these lines
also added this to daemon.conf With this you only need to double click on the pulseaudio.exe in the bin folder and it will wait for connections. |
okay this just really doesn't wanna work. I changed my config. It runs. Sits there, awaiting stuff. Paplay still says connection refused on windows side. |
Yes, nothing is listening if that command returns blank. It is possible you are running into something like #1561, #1350 or #416. I hope not, because that is a bear under the best of circumstances. I understand entirely that you want audio, not to go down a networking debug rabbit hole. But I'd be remiss if I didn't point it out as a possibility. Or, as likely, it could be a just a silly step missing, which I can't guess at the moment. Anyway, happy to see you trying, and don't want you discouraged. The most constructive thing you can do at this time is find a local computer club and get hands on help. Or I am happy to pursue the problem to the gates of hell here in this list; though I am not sure I'd wish that on anyone, or whether you'd find the result satisfactory. Patience (I prefer the term laziness) is another viable option. Audio devices aren't supported by WSL right now (that's just a hard fact), but I hope your post will help change that. It sounds like you have Linux up in a VM, and for all practical purposes that's the route I'd go if it were me. Going to ping @sunilmut at random just to make sure the guys are aware of your use case. |
Don't worry about netstat because output is empty for me too. Ok let's start again from the beginning. For the Windows side download and extract Pulseaudio 6 from here For the WSL side forget about paplay and use mplayer instead. |
Output says connection refused. What port is it listening on? I just googled and 4713 popped up; I didn't actually try. I guess I should get the thing up again so I can play along for reals. |
Ok when I double click pulseaudio.exe for fist time Windows Firewall asked me for permission. Maybe that's the problem here. |
Command is |
On WSL is empty.
|
@ultrasound1372 that first |
I'm using paplay for a reason. Because I don't wanna use wsl as a media player. I wanna use it to pipe output from synths and minimodem. |
okay, so it's listening now. I'm using paplay on the windows side to test. Allowed it strictly through firewall, it didn't ask me at first so I forced it. Netstat found it. Now, paplay on the windows side, executed as follows |
If you think you already have pulseaudio.exe listening on windows then test paplay like this: |
woot woot! Windows paplay finally works. Now how would I configure wsl to always use that gateway? Does it require me to explicitly specify things or will it connect to localhost and find my thing? |
On WSL edit or create /etc/pulse/client.conf and then test paplay on WSL with |
Or just:
|
alright! It works! For a bit it didn't, then I checked and the windows demon was doing the 20 second timeout. Set that to -1 and hopefully it'll stay. So, since I've configured pulse itself to do this, any application that uses pulse will now automatically stream to the windows side? |
Yes, the |
minimodem works, so I guess everything else should too. i'm off to install synth toolkits. Thanks for your help. |
Well, it did... Until I install anything that needs pulse. Then it throws something about a mutex? |
That's the #486 bug. Every time you see that you need to install the patched pulse0 with |
Ehh. That sounds like a massive throwback for developers, possibly beyond pulse audio. I have no flipping idea what a mutex is. But anyways, I kept the download in /temp and created a shell script on root called fixpulse.sh so when I install something, and it breaks, I can unbreak it. Hopefully espeak will install without doing this again, when I tried that it said unmet dependencies, apt -f install upgraded the deb. |
Yep, it's a PITA. I think @benhillis said support for syscalls like FUTEX_CMP_REQUEUE_PI_PRIVATE it's on the backlog though. |
in the meantime, can I either fake the version number of this patch or install the pulse version that used it? Because I cannot use apt anything unless it matches what it wants. |
You can hold a package with But I don't know too much about packet managers so maybe that will get more problems in the future. |
doesn't work, still haults the process and says this. |
Nah, forget it. It uninstalled all the dependencies. You can unhold it with |
nope, then it continues to error and yelling about that I held broken packages. I just need to fake the version number. How can I do that. When I try apt -f install after holding just libpulse0, it removes all of pulse! |
yes that happened too. I'm now trying updating the entire pulseaudio with the patched version. |
this is way too fucking complicated just to get audio and apps to use it! And beep will never work... |
WSL is right now just for commandline development scenarios and clearly not ready for audio support. About the beep sound see #1355 |
Ok I found a way to patch libpulse0 without screwing the package dependencies. You only need to replace libpulsecommon shared library. First make sure you have latest libpulse0 with
That's it. You only need to do this once and it should work at least until Ubuntu updates pulseaudio again. |
Thanks Ono. I was going to suggest that but wanted to let your help play out. Good suggestion. At base the problem here is Canonical updated from 3.3 to 3.4 and the PPA needs updating. "Effort" |
I've put up a new PPA for PulseAudio 8. Here's the libpulse0_8.0-0ubuntu3.4ppa1_amd64.deb that matters. Or do the usual:
|
Hi, I got this to work with great thanks to everyone in this thread. I am now able to use paplay while being ssh-d into a remote machine (CentOS 7) and hear sounds on my local machine (Windows 7). However, I wanted to use padsp and that does not seem to work. I am running my application like so while being ssh-d to my remote machine:
And I don't hear any sounds on my local machine. Could this be because the pulseaudio for Windows does not have padsp? I know that padsp forwards sound to the PulseServer which I know to be working fine because of paplay. But, does it attempt to use something like a "padsp.exe" on the local machine and doesn't find it? Or do I need to do something else? Like load a particular module into my pulse audio on the Windows side? |
@therealkenc could you update the ppa for bionic? it's impossible to install on bionic :( |
Ah so they fixed the mutex error that was preventing it from running? Cool, I can close this now I guess. |
$ sudo add-apt-repository ppa:therealkenc/wsl-pulseaudio; echo "$?"
A one-liner change to src/pulsecore/mutex-posix.c adding #undef HAVE_PTHREAD_PRIO_INHERIT to work around missing futex() surface in WSL.
More info: https://launchpad.net/~therealkenc/+archive/ubuntu/wsl-pulseaudio
Press [ENTER] to continue or Ctrl-c to cancel adding it.
Hit:1 http://archive.ubuntu.com/ubuntu focal InRelease
Hit:2 http://security.ubuntu.com/ubuntu focal-security InRelease
Hit:3 http://ppa.launchpad.net/openjdk-r/ppa/ubuntu focal InRelease
Hit:4 http://archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:5 http://archive.ubuntu.com/ubuntu focal-backports InRelease
Ign:6 http://ppa.launchpad.net/therealkenc/wsl-pulseaudio/ubuntu focal InRelease
Err:7 http://ppa.launchpad.net/therealkenc/wsl-pulseaudio/ubuntu focal Release
404 Not Found [IP: 2001:67c:1560:8008::15 80]
Reading package lists... Done
E: The repository 'http://ppa.launchpad.net/therealkenc/wsl-pulseaudio/ubuntu focal Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
100 |
this is a sort of support question but I don't know where else to post. Direct me if needed
Hello there.
So, I'm playing with wsl. I am a blind computer user, and so my interest in wsl is mainly the speech systems offered in it. ESpeak, festival etc. I am trying to figure out how I would go about bringing audio from the system, either using pulse audio or alsa. I do not currently have alsa, so PA is prefered.
Previous research and tests have lead me to realize that wsl currently does not implement audio of any kind, since linux doesn't have a specific implementation for audio. It's left up to the user, but the underlying framework needed for audio devices doesn't exist. I saw that I should be sending audio from pulse on linux to a pulse server on windows. Have tried this, it doesn't seem to work.
I have the pulse server on windows running, listening for incoming audio with no authentication. I then go over to linux and execute paplay to play a file. It says connection refused. This is reasonable, so I try explicitly specifying connection options instead.
paplay -s 127.0.0.1 -n linux audio.wav
This doesn't produce any errors, but no audio is heard. It sits there for a bit and then returns back to my shell. I can only assume this is an issue with finding the server or something.
If someone could guide me or give me a solid direction to follow to get audio from linux to windows I would appreciate it. I sort of assume it also has something to do with the way the networking is managed, maybe 127.0.0.1 isn't the address for the windows server? If this is the case, correct me.
P.S. Audio should just work! It works in a vm...
The text was updated successfully, but these errors were encountered: