[mythtv] [PATCH] Mac OS X audio patch

Jeremiah Morris jm at whpress.com
Mon Aug 30 13:07:44 EDT 2004

On 30 Aug 2004, at 1:24 AM, Nigel Pearson wrote:

>> Just so Nigel doesn't have to do all the work on the OS X port, a 
>> patch is attached for Core Audio output under Mac OS X.
> 	Jeremiah, thank you, thank you, thank you, thank you.

I'm so happy I could help... I've been lurking and benefiting so much 
from your patches.  After your video patch appeared, I was afraid you'd 
beat me to the punch and have it all working before I finished this 

It's actually an embarrassingly small amount of new code -- the ring 
buffer handling comes direct from the OSS code, and Apple's code 
handles all the audio conversion, so it's

> 	I still want to write a raw-device level driver so that
> Darwin/X11 users can get sound, but this is great.
> 	Don't suppose you know how to drive the HAL directly?

Well, a month ago I knew nothing about sound on OS X, but I can take a 
look.  It seems to me that the most helpful thing would be OSS 
compatibility for Darwin, so maybe OpenAudio is the place for me to 


BTW, I did at least key the Core Audio driver to a new config flag, 
rather than CONFIG_DARWIN, so it would be easier to accommodate Darwin 
users -- I'd love to see Myth working there too.

> 	Playing back a clip is OK for about a second, but then it stutters.
> This could be a CPU load thing (my box only just keeps up with the 
> video),
> or it could be some bug in the timing.

I'm sure there are awful AV sync bugs lurking -- on my 450 MHz test 
machine, the video looks like a webcam, so I can't really test it too 
well. ;)  I set "disablevideo" to true in NuppelVideoPlayer.cpp, and 
get sound with an occasional drop.  Can you try this test too, as an 
additional data point?  (Note: mythfrontend ends up crashing when I 
exit a recording this way, probably from trying to draw a dialog to a 
nonexistent video screen, but the audio plays OK before that point.)

>  NVP outputs:

Thanks for the info -- I'll do some debugging later this week, and see 
what I can find out.  I should have an updated version with more 
verbose output by next week, for the next round of tests.

Thanks for all your help in getting to this point, Nigel, and thanks to 
Isaac et al. for such a great system!

- Jeremiah

More information about the mythtv-dev mailing list