Mac AC3: Trying to figure out how DVDPlayer does it

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
gusax
Blank Cone
Blank Cone
Posts: 24
Joined: 10 Dec 2004 08:59
Contact:

Mac AC3: Trying to figure out how DVDPlayer does it

Postby gusax » 11 Mar 2005 21:15

I downloaded the CHUD tools from Apple and it included an application called Shark that is supposed to help when developing programs because it shows how often different parts of the source code is run. Or something like that :-)

Anyway I let Shark work on DVDPlayer, once with ac3 passthrough turned on and once with it turned off. I have tried to make something out of the files but I don't understand all the calls to this and that.
The conversion to PCM-audio is pretty visible though.

I saved the outputs from Shark in the following archive:
http://c51.ib.student.liu.se/~gusax840/ ... c3Pcm.sitx (7 MB)
(You'll need Shark to view them, it's comes with the CHUD tools from Apple)

I'm asking because I'm trying to make a very simple program that only has one function - to play an ac-3 file just to try to find out how it "should" be done so that coreaudio.c can be fixed later on.

To DJ or a similar pro - do you think you can make something out of the Shark files?

Also I noticed that when DVDPlayer starts up with ac3 activated, the sound from iTunes mutes. That to me sounds like DVDPlayer is in "hog mode". Can't tell if thats true from the Shark files though :-(

The DJ
Cone Master
Cone Master
Posts: 5987
Joined: 22 Nov 2003 21:52
VLC version: git
Operating System: Mac OS X
Location: Enschede, Holland
Contact:

Postby The DJ » 12 Mar 2005 17:05

not so much hog mode (though it probaly does that as well) but it sets "no mixing" mode. I'll try to look at this later, but i'm not really sure if i can do anything with it. I know very little about CoreAudio.
Don't use PMs for support questions.

gusax
Blank Cone
Blank Cone
Posts: 24
Joined: 10 Dec 2004 08:59
Contact:

Postby gusax » 14 Mar 2005 17:14

CoreAudio is :-(
But thanks for taking your time!

I don't think Dvd player takes hog mode either.
I did a search for "hog" in shark and got no hits...

However when in PCM-mode it uses an AUHAL-object (can be found on two rows) that is completely missing when in ac3-mode. The AUHAL seems to be used when converting the ac3 to ordinary stereo sound.

Looks like we'll have to wait and see how much they have fixed in Tiger, it seems that Quicktime 7 supports multichannel audio so maybe there is a way to use that it instead of CoreAudio.

The DJ
Cone Master
Cone Master
Posts: 5987
Joined: 22 Nov 2003 21:52
VLC version: git
Operating System: Mac OS X
Location: Enschede, Holland
Contact:

Postby The DJ » 14 Mar 2005 20:57

AUHAL is the method that should be used to send audio output to CoreAudio. It is basically a wrapper object around the functions that we still use. It was only created after 10.2

The fact that we still not fully understand how SPDIF output is supposed to be done on OSX is one of the reasons we still haven't done ONE thing about the problems with our VLC audio output core on OSX.

QT also uses CoreAudio. QT is no more than a media framework that drives the hardware wrappers (Quartz, CoreAudio and others)
Don't use PMs for support questions.


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: No registered users and 14 guests