Re: Native Device Formats
Re: Native Device Formats
- Subject: Re: Native Device Formats
- From: "Mikael Hakman" <email@hidden>
- Date: Sat, 14 Jun 2008 13:34:26 +0200
- Organization: Datakonsulten AB
Thanks Bill - this sounds very interesting.
I understand that if a device driver provides (exposes) its native (wire)
format as one of its client formats then that format could of course be used
by clients. The problem is, not many devices do this, probably because
vendors think that this "only 32 bit floats for clients" misconception is
true. Either because of how this topic is described in documentation,
including IOKit docs, and/or because many devices use system supplied class
drivers that don't support integer formats for clients. Apple's own built-in
device (driver) does not expose such integer formats to clients.
While you can ask a device (driver) what physical formats it supports/uses,
I cannot find any way to force that format to be used as IOProc buffer
format unless, as described above, the device provides this format also as
its client format.
When using digital audio devices there is an option to use one of the
encoded audio formats, which would (hopefully) output/input the exact bits
you have/get. The problem with this is however that such format sets (should
set) also the non-audio flag on the transport stream which would either make
the receiving device to mute (according to AES/EBU spec) or try decoding it
resulting in either static or silence or plain error.
Therefore, could you please be a little more specific - which properties do
you mean and which comments in the header file do you refer to? Even better,
a simple example of requesting integer format to/from IOProc of e.g.
built-in device would be extremely appreciated.
/Mikael
On Saturday, June 14, 2008 4:24 AM, William Stewart wrote:
Just one point to add here.
Core Audio by default provides data to and from the client as 32 bit
floats - we call this the canonical format as this is used generically
throughout the system regardless of the device present. However, you also
have the ability to deal directly with the native format of the device -
there is direct support for this in the AudioHardware.h properties for
devices.
It is a common misconception that core audio's "canonical" format for the
client is the "only" format and it is usually in comparison to ASIO that
that misconception is repeated. So, I don't want to buy into this
interesting debate, but I do want to correct the unstated assertion that
you cannot deal in the native bits of the underlying device with core
audio. You can. There are some comments in the header
<CoreAudio/AudioHardware.h> that can help you out with this.
Bill
_______________________________________________
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