Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

PulseAudio 3.0 #18838

Closed
wants to merge 9 commits into from
Closed

PulseAudio 3.0 #18838

wants to merge 9 commits into from

Conversation

albertz
Copy link
Contributor

@albertz albertz commented Mar 30, 2013

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.

@MikeMcQuaid
Copy link
Member

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

@albertz
Copy link
Contributor Author

albertz commented Mar 30, 2013

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.

@mistydemeo
Copy link
Member

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

@albertz
Copy link
Contributor Author

albertz commented Mar 30, 2013

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.

end

# remove sconv_neon.c because it wont compile and is not needed.
system "echo > src/pulsecore/sconv_neon.c"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you reported this issue to the developers?

@mistydemeo
Copy link
Member

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.

@mistydemeo
Copy link
Member

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

@albertz
Copy link
Contributor Author

albertz commented Mar 30, 2013

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
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/Headers/Multiprocessing.h
az@Albert-Zeyer-MacBook-Pro ~> 
find /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk | grep Multiprocessing.h
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/Developer/Headers/FlatCarbon/Multiprocessing.h
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/Headers/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.

@albertz
Copy link
Contributor Author

albertz commented Apr 1, 2013

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

@albertz
Copy link
Contributor Author

albertz commented Apr 1, 2013

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.

@albertz
Copy link
Contributor Author

albertz commented Apr 1, 2013

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.

@albertz
Copy link
Contributor Author

albertz commented Apr 1, 2013

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.

@mistydemeo
Copy link
Member

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?

@albertz
Copy link
Contributor Author

albertz commented Apr 2, 2013

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.

@albertz
Copy link
Contributor Author

albertz commented Apr 2, 2013

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.

@albertz
Copy link
Contributor Author

albertz commented Apr 2, 2013

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?

@albertz
Copy link
Contributor Author

albertz commented Apr 2, 2013

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.

@mistydemeo
Copy link
Member

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!

@ehntoo ehntoo mentioned this pull request Aug 29, 2013
@adammw adammw mentioned this pull request Sep 26, 2013
@Homebrew Homebrew 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.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants