Re: Using the new "Input" bus of the DefaultOutputUnit
Re: Using the new "Input" bus of the DefaultOutputUnit
- Subject: Re: Using the new "Input" bus of the DefaultOutputUnit
- From: Robert Grant <email@hidden>
- Date: Fri, 14 Nov 2003 16:30:56 -0500
Hey Doug and Brad,
Would either of you mind trying to get the little demo I made working
with the HALOutputUnit:
http://www.grantedsw.com/downloads/IOTest.zip
I'm not sure there's been a good example of using the HALOutputUnit
which is why I've mostly stuck with the DefaultOutputUnit. My
assumption has been that it (the HALOU) will set itself up with the
default IO settings but won't follow if they're changed?
Thanks,
Robert.
On Nov 14, 2003, at 4:14 PM, Doug Wyatt wrote:
On Nov 12, 2003, at 4:39, Robert Grant wrote:
Hi Brad,
Yeah - I spotted that right before I went to bed last night - my eyes
must have drifted from reading the EnableIO description to the HasIO
property. I've fixed it now:
status = AudioUnitSetProperty(output,
kAudioOutputUnitProperty_EnableIO,
kAudioUnitScope_Input,
1,
&data,
sizeof(data) );
But I'm still getting an InvalidProperty error. I even tried turning
off Output with the same problem....
Hi Robert,
You can't do this on the default output unit, you'll get an invalid
property error. You CAN do this on the HAL output unit.
I wrote the following before my jetlagged brain comprehended what was
going on -- I don't think it's your problem, but it may help others
trying to understand how input works with the output unit now:
Client HAL
| |
+------------------------+
| |
| element 0 element 1 |
| (output) (input) |
+------------------------+
| |
HAL Client
Also isn't Metering now available for the StereoMixer?
No, just the matrix mixer.
Doug
I've tried turning that on but it's also giving me InvalidProperty.
I'm running Panther and QT 6.4 but I'm starting to think I've got the
old DefaultOutputUnit and the old StereoMixer....? I've definitely
got the new MatrixMixer (though that's a whole other area for
confusion for me :-))
Thanks,
Robert.
On Nov 12, 2003, at 12:21 AM, Brad Ford wrote:
_HasIO is a getter only. If you want to set up which busses are
active on an output unit, you need to use the setter equivalent of
the _HasIO property, _EnableIO.
As for why you are getting a bus count of 1 on your
DefaultOutputUnit, I would guess it's because you haven't enabled
the input side of your output unit. By default, AudioOutputUnits
are instantiated as output-only units. Input is disabled.
Also, what is your default device? Is it a USB device? If it is,
AMS is tricking you--it's actually coalescing two AudioDevice's into
one behind your back, since USB devices present their input and
their output as two separate devices.
HTH.
-Brad Ford
QuickTime Engineering
On Nov 11, 2003, at 6:58 PM, Robert Grant wrote:
Researching the AudioUnitRender issue in the other thread helped me
find this property for enabling Input on the OutputUnit:
status = AudioUnitSetProperty(output,
kAudioOutputUnitProperty_HasIO,
kAudioUnitScope_Input,
1,
&data,
sizeof(data) );
But setting this property gets me an InvalidProperty error...
I think I interpreted this correctly: "scope input, element 1 =
input" but the comments in the header file are a little hard to
parse...
But perhaps it's getting too late! :-)
Robert.
On Nov 11, 2003, at 9:01 PM, Robert Grant wrote:
I'm also trying to use the new input capability of the
DefaultOutputUnit but I'm not sure how it's supposed to work...
actually I don't think it is working.
From the docs: "Any of these I/O units may be used to pull input
data from its associated audio device, through any number or
combination of audio units or audio unit graphs, and output back
through the I/O unit. The I/O unit itself has two busses: 0 and 1,
where the 0 bus is designated as the output, and the 1 bus is the
input bus. The connections between the output of the 0 bus and the
audio device and the input of the 1 bus and the audio device are
made when the unit is associated with the device."
However when I query the bus count of the output unit I get only
one bus which is probably not the case despite the fact that AMS
is showing I have input and output enabled.
Should I get two buses reported for DefaultOutputUnit?
Thanks,
Robert.
_______________________________________________
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.