[pulseaudio-discuss] PA now compiles on OS X

Kim Lester kim at dfusion.com.au
Wed Jul 22 20:58:46 PDT 2009


I'm happy to upload my patches but I'd like advice on how you want them.
I consider them at "hack" level and _might_ break linux compiles so I  
don't want to break the trunk (not that I expect I have write  
permission anyway). I'm also not a git expert, so advice please...

Incidentally I also made some other minor changes as I got tired of  
the compiler complaints about "wait" (and one other) function  
arguments shadowing globals because -Wshadow is turned on. In my case   
simply appended and _ so wait becomes wait_ but I'd rather not send  
those changes back without agreement.

Other comments below:

On 23/07/2009, at 4:44 AM, Lennart Poettering wrote:

> On Mon, 20.07.09 04:16, Kim Lester (kim at dfusion.com.au) wrote:
>
> I'd be very interested to have a peek on your patches!
>
>> 	* Darwin doesn't support the POSIX clock_get*() functions. Guess  
>> what
>> PA sues *%$#)*
>> 		So I've written high resolution clock_get*()
>> equivalent functions.
>
> Hmm, but we fall back to gettimeofday if the monotonic clock does not
> exist. Which should be good enough. Or isn't it?

Yes that's quite correct. I actually got stuck in the tests  
(rtstutter.c) that calls clock_gettime() directly. Incidentally alsa  
tests also include clock_gettime().
The obvious solution was just to change the test but I had been  
irritated by this omission of Apple and did some homework.
I haven't done any performance tests myself but reading Apple and  
other articles indicates that high res times are available
and efficient. I'm not sure how good gettimeofday is in this regard  
(it has to do extra work at least). So since I happen to care about
latency I tried writing a replacement in the spirit of hires timers.  
The actual difference may not be worth it and I'm not claiming my  
version is more efficient (I did a divide to get seconds from ns which  
would be better avoided).
I'm kinda surprised there isn't a set of gnu functions to replace  
these missing OS library calls. I looked but didn't find one so I  
wrote one.
I also thought it would be cleaner in principle to have a replacement  
clock_getttime() than to #ifdef around multiple other sections of code.

>> 	* PA scripts use preload etc to load modules - but Darwin treats  
>> shared
>> libs and modules (bundles) as different species, so preload breaks.
>> &%(#**&@#@!
>
> Hmm, the preloading feature is merely an optimization. It is safe to
> disable that.
>

regards
Kim





More information about the pulseaudio-discuss mailing list