[pulseaudio-discuss] [PATCH 09/10] Implement some functions for win32
mkbosmans at gmail.com
Thu Jan 13 02:17:11 PST 2011
2011/1/11 Colin Guthrie <gmane at colin.guthr.ie>:
> 'Twas brillig, and Maarten Bosmans at 11/01/11 10:51 did gyre and gimble:
>> I'll prepare a new patch series with all your points adressed.
> Sweet. Feel free to supply a remote from which I can pull if it's easier
> (doesn't matter much to me).
I've opened a GitHub account. Let's see if that works for you. At
you'll find basically the same set of patches I sent to the list, with
your comments incorporated and some other changes, which I'll discuss
> I'm not 100% sure of setenv vs putenv but both appear to be as thread
> safe as the other (the only reason I can think of to favour one over the
I've changed it in a separate one-line commit (the first one), to make
it (and the rationale in the commit message) stand out between all the
win32 related changes, as this touches Linux (though no change in
behaviour is expected)
> It dates back a while (045c1d60: Glitch free merge to trunk - in svn
> days), but putenv() was used prior to that and introduced in
> 9c87a65ce91c38b60c19ae108a51a2e8ce46a85c. Doesn't look like it was used
> over setenv() for any real reason, so I guess that should be fine.
Hmm, yeah, that was the time of Lennart's huge commits touching almost
all of the codebase at once. That certainly has diminished the value
of git history digging a bit. I came across this often when trying to
find when API was changed in order to change the win32 code too.
> Thanks for looking at this :)
I am a bit further now. The daemon starts successfully with null-sink
and protocol-native-tcp. And pactl list works on the local server. So
no audio yet, but getting there.
The change I would like to see reviewed, before merging are the read,
write => pa_read, pa_write changes in fdsem.c
This is necessary, because on windows the code in pipe.c makes a pipe
out of two sockets instead of file descriptors. That means that a bare
read/write won't work, because it expects an fd. pa_read/pa_write
provides a nice wrapper that uses recv/send in case of Windows
sockets. But as pa_read/pa_write also does a loop to cover up EINTR,
I'm not sure whether the code is still correct on Linux. (Limited
testing of this code on Linux reveals no problems though)
The last commit in the mingw32-build branch is an attempt to fix
module-waveout, but it is very much work in progress. So I suggest you
pull from the commit before that.
More information about the pulseaudio-discuss