PulseAudio 3.0 #18838

wants to merge 9 commits into

3 participants


PulseAudio 3.0 compiles fine with minimal patching. This is the updated formular. PulseAudio works then and has CoreAudio support. To try out, edit /usr/local/etc/pulse/default.pa and change module-detect to module-coreaudio-detect.

Note that the HEAD also almost compiles. The script git-version-info fails because it cannot find the .git dir / git info. When trying that manually, something in the autogen fails - install-sh is missing.

Homebrew member

What's the use-case for PulseAudio on OSX?


The main standard use-case: Other PulseAudio clients can play audio on your Mac. For example, you want to stream the audio from your Linux system over to your Mac.

In my case, I am playing sound over SSH with PulseAudio.


What configurations have you tested on? Pulseaudio was removed in #18199 because it couldn't compile reliably.


I have MacOSX 10.8 with Apple clang version 4.0 (tags/Apple/clang-421.0.57) (based on LLVM 3.1svn). The old PulseAudio 2.1 (from #18199) also compiled and ran for me but I think CoreAudio support is missing there, that is why I tried PulseAudio 3.0.

@mistydemeo mistydemeo commented on an outdated diff Mar 30, 2013
+ "--disable-avahi",
+ "--with-udev-rules-dir=#{lib}/udev/rules.d",
+ "--with-mac-sysroot=#{MacOS.sdk_path}",
+ "--with-mac-version-min=#{MacOS.version}"]
+ args << '--disable-dbus' unless build.include? 'with-dbus'
+ args << "--disable-nls" if build.head? and not Formula.factory('libtool').installed?
+ if build.head? then
+ system "./autogen.sh", *args
+ else
+ system "./configure", *args
+ end
+ # remove sconv_neon.c because it wont compile and is not needed.
+ system "echo > src/pulsecore/sconv_neon.c"
mistydemeo added a line comment Mar 30, 2013

Have you reported this issue to the developers?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Hm, so it's able to build the semaphore-osx code for you? It uses deprecated functions and failed to build on 10.7.4 for me.


Here are the build logs from the failed build: https://gist.github.com/mistydemeo/e6497ac3ee4e3e2cdd1e


Not sure if that file is compiling. But I just checked and I have that file in both 10.7 and 10.8 SDK:

find /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk | grep Multiprocessing.h
az@Albert-Zeyer-MacBook-Pro ~> 
find /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk | grep Multiprocessing.h

I haven't reported it yet. I wasn't sure if there is maybe some setting wrong with the configure script because that file seems ARM (Neon) related.


I made an upstream report about src/pulsecore/sconv_neon.c here.


Another related bug report about that modules-coreaudio-detect should be loaded by default on MacOSX is here. Right now, the default config doesn't work out-of-the-box on MacOSX.


There is another error in PulseAudio (shm_unlink failed: Permission denied) I sometimes get after a while. It might also be MacOSX related. I reported it here.


Another issue is when you try to build the trunk (--HEAD). There is a script git-version-info which tries to determine the Git revision. That doesn't work because Homebrew doesn't include the .git directory in the temporary build directory (maybe there should be a way in the formular to enable this?). I made a bug report with the suggestion to support a fallback in that case.


But I just checked and I have that file in both 10.7 and 10.8 SDK:

Multiprocessing.h exists, but is just a pointer to CoreServices/CoreServices.h; including it on its own is deprecated (as is FlatCarbon as a whole). That was actually the case at the time this code was done. The proper include would just be to include CoreServices/CoreServices.h. The OS X semaphore code in PulseAudio hasn't been changed substantially for four years.

At any rate, this formula still doesn't build for me due to the Multiprocessing.h header. I'm surprised it works for you. Do you have an Xcode+CLT install?


I have a standard Xcode (4.6.1) installation. Multiprocessing.h is not a pointer for me. It has this content but with the deprecation notice as you said. Probably CoreServices.h would include it indirectly, though (as normally, the main header includes everything else).

I filled an upstream bug report here.

I checked semaphore-*.c and there is also a POSIX pthreads implementation. I wonder why that isn't used instead. Maybe it is already or we can just patch the build to use that one.


I pushed another commit which also removes the semaphore-osx.c from the build. It still builds fine for me, so it seems it wasn't used for me.


Ok, semaphore-posix.c compiles fine but doesn't work because sem_init is not supported on OSX. I will look at alternatives.

But I also still wonder why the current semaphore-osx.c code doesn't work for you. You say it doesn't find Multiprocessing.h for you although the file exists? So maybe some include path is missing?


I have rewritten semaphore-osx.c myself (see here). (I also posted this upstream of course. See the bug report.) I also extended the formular so that it uses this rewritten semaphore-osx.c for now.


Multiprocessing.h is not a pointer for me.

Aha, the FlatCarbon one is a pointer to CoreServices.h, while the one in the CarbonCore framework is not. Odd.

Thanks for submitting the bug reports. At this point there are enough issues that I won't pull PulseAudio as is, but can you keep track of the issues and resubmit if/when the PulseAudio devs act on them? Thanks!

@mistydemeo mistydemeo closed this Apr 2, 2013
@ehntoo ehntoo referenced this pull request Aug 29, 2013

PulseAudio 4.0 #22185

@adammw adammw referenced this pull request Sep 26, 2013

pulseaudio 4.0 #22846

@xu-cheng xu-cheng locked and limited conversation to collaborators Feb 16, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.