Re: A simple 'Device Through' app (need some help).
Re: A simple 'Device Through' app (need some help).
- Subject: Re: A simple 'Device Through' app (need some help).
- From: "Mikael Hakman" <email@hidden>
- Date: Sat, 28 Jun 2008 14:48:53 +0200
- Organization: Datakonsulten AB
On Friday, June 27, 2008 9:39 AM, Brian Willoughby wrote:
.well, you can thank the designers of the USB specification for that harsh
reality.
I beg to differ. IMO there is nothing wrong with USB specification. It is OS
X implementation of that specification that causes these problems and
requires this kind of complex programming on the application part. There is
nothing in the USB specification that prevents a driver or an OS from
exposing a device consisting of 2 sub devices (input and output) as one
device.
You have the same problem when using the built-in device. My MBP uses
Realtek HD circuit, which AFAIK sits on PCI bus, not on USB. In OS X this
device is exposed as 2 separate devices, one for input and one for output
and therefore requires this kind of complex programming. In Windows that I
boot on the same hardware, this device is exposed as one device having both
input and output channels. I can even run an ASIO driver on it and use one
simple "IOProc" callback for getting the input and putting the output at the
same time and synchronized.
...You basically need a sample rate converter between the input and
output, because USB-Audio does not sync the two halves - at least that's
my understanding...
It is OS X implementation that doesn't sync the two halves that it created.
The device itself has one clock only and its inputs and outputs are
synchronized. But even using current OS X implementation it should be
possible to work without SRC as long as both halves are from the same
physical device or are synchronized to the same (external) clock. Working
directly at the HAL level, copy your input data to a buffer in your input
IOProc, and output this buffer in your output IOProc. If both IOProcs are on
the same thread then this should work.
Regards/Mikael
BTW, Realtek HD is amazingly good when used as pure digital input and
output. It has unexpectedly low jitter, which is the only thing that matters
in digital audio streams.
_______________________________________________
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