Re: HAL Devices and Streams (with QuickTime)
Re: HAL Devices and Streams (with QuickTime)
- Subject: Re: HAL Devices and Streams (with QuickTime)
- From: <email@hidden>
- Date: Fri, 18 Jan 2002 01:01:35 -0600
>
>>> <email@hidden> wrote:
>
>>> Audio devices come and go at will under OS 9 too. USB audio for example...
>
>>
>
>> Jeff Moore <email@hidden> wrote:
>
>>
>
>> Actually this is not true. 9 sucks particularly bad in this regard. With USB
>
>> audio on 9 you are allowed to connect exactly 1 USB audio device. Connect a
>
>> second and you won't be able to access it through the Sound Manager. Plus,
>
>> you won't be able to use the built-in hardware as soon as you plug in your
>
>> first USB Audio device.
>
>
>
> Not true. Boot into OS 9. Plug-in two Griffin USB iMics (iMics have outputs
>
> too). Check the Outputs tab in the Sound control panel. You will see two
>
> USB Audio options, in addition to Built-in.
>
>
Hmm, that's odd since I have two USB Audio output devices (two pairs of
>
speakers) plugged in and I can only see the one I plugged in first, and the
>
built-in hardware isn't available.
USB Speakers are designed to take over the built-in audio. The Griffin iMic
or Telex P900 outputs do not take over built-in, and can be accessed in
addition to built-in, or other connected outputs.
>
> Also try the DigiGram VXPocket PC-Card for PowerBooks. QuickTime can access
>
> both VXPocket and Built-In simultaneously, sending different audio to each.
>
>
>
In this case, the Digigram card has installed it's own sdev. So of course it
>
will be able to be addressed separately.
So you're saying as soon as they ship their OS X drivers, I'll be able to
use the QuickTime/Component APIs to route various QuickTime audio tracks to
the VXPocket, in addition to the Built-In output, or any other sdev, all at
the same time? (Just like on OS 9?)
>
>> The reason why is that there is only one sdev that handles both the built-in
>
>> audio and USB audio. It makes up for a lot of the Sound Manager's short
>
>> comings at the driver level.
>
>
>
> This can't always be true, since the USB iMic doesn't take over the Built-In
>
> output under OS 9. USB devices that *do* (Apple's USB Speakers, for example)
>
> are by design -- it doesn't have to be that way.
>
>
>
I'll buy that (I was testing specifically with speaker devices). It's just
>
another example of what's bad about OS 9's support for audio.
How is that bad? Sounds pretty versatile and elegant to me. If you plug in
speakers, it takes over built-in. Plug-in a USB "sound card", and that's
just what you get... More inputs and outputs. The Apple Speakers didn't
have to take over Built-In, it just makes sense. The iMic and P900 install
their own sdevs, right? But it doesn't work... That makes we worry about
the non-USB VXPocket too.
>
>> There is no abstraction point to do this for the output side of the Sound
>
>> Manager.
>
>>
>
> Aren't the QT calls FindNextComponent, GetComponentInfo, and
>
> MediaSetSoundOutputComponent the necessary abstractions?
>
>
>
>
Yeah, what if you unplug a device while you are in the middle of the discovery
>
loop? You'd end up with an invalid component and dangling pointers all over
>
the place.
>
>
The point you are missing is that there is not a reasonable and reliable way
>
to make the list of available sdevs match the list of devices in the HAL. I
>
know because I tried. It didn't work out and ended up with all sorts of
>
interesting crashes.
How about a "Virtual Proxy sdev"?. If a device gets unplugged, don't dangle
those pointers, and don't make an invalid component... The proxy acts as a
virtual "dead device", that doesn't do anything but prevent errors. If a
device gets unplugged and the audio stops working, that's usually the point
of disconnecting. The user will just select a different output device, or
plug the device back in, and the proxy could re-link to the real HAL device,
or eventually time-out, and un-register the sdev all proper like.
>
I suppose the short answer to this is that if this were at all possible to
>
do in a fashion that was robust, it would have been done by now.
>
>
--
>
>
Jeff Moore
>
Core Audio
>
Apple
Thanks Jeff, you can't blame me for pushing a little... :) I seriously
appreciate the effort. X is great, we just need to get other the hurdles.
-Jason