• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: User-land CoreAudio driver and Leopard
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: User-land CoreAudio driver and Leopard


  • Subject: Re: User-land CoreAudio driver and Leopard
  • From: Jeff Moore <email@hidden>
  • Date: Wed, 28 Nov 2007 11:07:24 -0800


On Nov 28, 2007, at 1:44 AM, Stéphane Letz wrote:


On Nov 27, 2007, at 3:36 AM, Stéphane Letz wrote:

Actually I found out that some applications call StopIOProc in the
IO callback... and since my system cannot handle that, I had to
reorganize the while thing. Now I'm using an additional thread that
execute pending commands (with ExecuteAllCommands) when these
commands are triggered from the IO callback, and this works well.

A primary example of such a construct is AUHAL. It pretty much always stops it's IOProc from the IO thread.

Note that when an app stops it's IOProc from inside the IOProc, it has
a very specific semantic that you have to be sure to implement:
Stopping an IOProc from inside that IOProc has the guarantee that the
IOProc being stopped won't get called again.

Hum... not sure i can simply guarantee that, but I've never seen any problem... What could happen?

The worst case scenario is that the app crashes because the user-data pointer you pass to them in their IOProc is now stale because they weren't expecting to get called again.


Note that AUHAL relies on this semantic and lots of apps use AUHAL. So not supporting it risks breaking lots of apps.

The last problem I have is DVD Player that refuses to start when our
JackRouter driver is selected as default :  I see AddIOProc but no
StartIOProc is ever called... If on the contrary "Built-in Audio" is
selected as default, *then* DVD Player is launched, DVD Player plays
correctly and in this case switching to JackRouter *dynamically*
using AMS while DVD Player  is running works: DVD Player correctly
see the JackRouter driver and start playing...

Any idea on this specific problem?

When the DVD Player is outputting linear PCM, it just uses AUHAL like any other application. When it is outputting AC-3 it uses the HAL directly and has some strict requirements about what it expects the device to look like (has to say it supports AC-3, etc).

I think the DVD Player also wants to set the buffer size to something
specific.

This was the problem. DVD Player tries to use a buffer of 1024 frames. Since our plugin can only work with a single buffer-size (for a given setting of the server), DVD Player fails to start is the server is currently running with a size different from 1024.... But the strange thing is that if DVD Player is first starting with another device (like Built-in) then switched to JackRouter running at 512 frames, it works!
So I guess this should be considered like a bug in DVD Player... Where can this be reported?


Same place as usual: http://developer.apple.com/bugreporter/


--

Jeff Moore
Core Audio
Apple


_______________________________________________ Do not post admin requests to the list. They will be ignored. Coreaudio-api mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Re: User-land CoreAudio driver and Leopard (From: Stéphane Letz <email@hidden>)

  • Prev by Date: Re: Buffer Size in Audio Units
  • Next by Date: Re: Buffer Size in Audio Units
  • Previous by thread: Re: User-land CoreAudio driver and Leopard
  • Next by thread: How to choose the AudioQueue output device ?
  • Index(es):
    • Date
    • Thread