Re: HALOutputUnit (Pt 1)
Re: HALOutputUnit (Pt 1)
- Subject: Re: HALOutputUnit (Pt 1)
- From: Jeff Moore <email@hidden>
- Date: Thu, 15 Jan 2004 12:10:19 -0800
Can you ssh to the machine when it is in that state?
If you can, you can use sample or gdb to figure out what's going out to
lunch.
On Jan 14, 2004, at 6:09 PM, Robert Grant wrote:
The last try was too long for the listserv.
Begin forwarded message:
From: Robert Grant <email@hidden>
Date: January 14, 2004 9:04:33 PM EST
To: Brad Ford <email@hidden>
Cc: Doug Wyatt <email@hidden>, CoreAudio API
<email@hidden>
Subject: Re: HALOutputUnit (Pt 1)
Ahah!
So here are the steps that I'm now performing:
1) Open a HALOutputUnit that you want to use for input.
2) Disable the Output bus
3) Enable the Input bus
4) Set the CurrentDevice to an input device
5) Check that the input bus is ready to do IO
If the input unit is ready to go:
6) Configure the render callback
7) Initialize the input unit
8) Start the input unit.
In the render callback call AudioUnitRender and store the data in the
buffers.
When I try this HasIO is coming back with 1 - yay! But shortly after
my computer freezes (except for the mouse) - boo.
Any other steps I'm missing? :-)
BTW Panther is so much faster at coming back from a hard reboot than
Jaguar, which is nice, because it's happening a lot ;-)
Thanks,
Robert.
On Jan 14, 2004, at 8:18 PM, Brad Ford wrote:
You must have QT 6.5 in order for this to work. There were some
bugs before this update. The order is also important. Don't try
to set the CurrentDevice property before you've set up the unit for
input. So:
1. EnableIO - enable input with SetProperty
2. EnableIO - disable output with SetProperty
3. CurrentDevice - set the device to the appropriate input device.
-Brad
On Jan 14, 2004, at 4:41 PM, Robert Grant wrote:
Hi Doug,
Well that explains why EnableIO seemed to be happy but HasIO was
not. And I was trying to do this on the OutputUnit - somewhere
along the line I didn't register the fact that even though USB
devices are two separate beasts I still need two separate
HALOutputUnits (i have a meme in my head that says "only one output
unit per graph!"). I thought you guys were doing some magic to
bring them back together behind the scenes...
So I'm now loading the Input device into a second HALOutputUnit,
but I'm still unable to get it to think it can do input... It's
doing exactly the same as before. EnableIO works and HasIO returns
NO.
Does the HALOutputUnit need to be initialized before configuring
the inputs?
Thanks,
Robert.
On Jan 14, 2004, at 5:55 PM, Doug Wyatt wrote:
N.B., I am looking at the source that shipped with QT 6.5, which
is newer than what shipped with Panther. A couple things related
to input changed in the interim...
HasIO and EnableIO are different properties.
HasIO will return 1 or 0 to indicate whether the currently
selected device has any input streams (when you are interrogating
the input scope's element 1) or any output streams (when you are
interrogating the output scope's element 0). (These scope/element
pairs are the ones that are associated with the hardware, their
opposites reflect the format being communicated to the outside
world.)
So if HasIO is returning 0, you may be looking at a USB output
device and not a USB input device. Or you may be encountering
something that was fixed in QT 6.5.
It looks like enabling input fails to fail if the device doesn't
have any input streams (and the same applies to output). It could
be considered a bug.
Doug
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.
--
Jeff Moore
Core Audio
Apple
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.