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: Tue, 15 Jan 2002 01:05:10 -0600
>
> Are there no plans to make QuickTime's multiple soundcard support function on
>
> OS X as it does on OS 9?
>
>
I can't answer that question (or any questions about future plans) in this
>
forum. Suffice to say that we agree that it isn't an optimal solution. But,
>
the problem is a whole lot deeper than just making an sdev for each device,
>
though.
Understand. But some things you said below don't seem to be true...
>
> Audio devices come and go at will under OS 9 too. USB audio for example...
>
>
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 are outputs
too). Check the Outputs tab in the Sound control panel. You will see two
USB Audio options, in addition to Built-in. My software (via QT) allows
independent and simultaneous output via both Griffin iMics under OS 9, or
even Built-In and USB.
Next as a non-USB example, try the same with the DigiGram VXPocket PC-Card
for PowerBooks. QuickTime can access both the VXPocket and Built-In outputs
simultaneously, sending different audio to each.
>
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. To a certain extent, this is what we've done
>
with the HAL sdev component on X. But there is still only one component on 9
>
and on X.
This can't always be true (for OS 9 at least), since the USB iMic doesn't
take over the Built-In output, and allows both to be used. I know there are
other USB devices that *do* take over the built-in output (for example
Apple's USB Speakers)... But I think that is by design -- since it doesn't
have to be that way (proven by the iMic's output).
>
> The QuickTime API under OS 9 did not have a problem with this. Why not
>
> bridge the QuickTime component API calls to work with any discovered HAL
>
> output devices?
>
>
There is no abstraction point to do this for the output side of the Sound
>
Manager. The Sound Input Manager does have the necessary abstractions and
>
does indeed allow you full access to all the devices on the system through
>
SPBGetIndexedDevice.
Aren't the QT calls FindNextComponent, GetComponentInfo, and
MediaSetSoundOutputComponent the necessary abstractions? They abstract the
output hardware just the same, or am I missing something here?
FindNextComponent:
http://developer.apple.com/techpubs/quicktime/qtdevdocs/APIREF/SOURCESI/find
nextcomponent.htm
GetComponentInfo:
http://developer.apple.com/techpubs/quicktime/qtdevdocs/APIREF/SOURCESI/getc
omponentinfo.htm
MediaSetSoundOutputComponent:
http://developer.apple.com/techpubs/quicktime/qtdevdocs/APIREF/SOURCESII/med
setsndoutcomp.htm
MediaGetSoundOutputComponent:
http://developer.apple.com/techpubs/quicktime/qtdevdocs/APIREF/SOURCESII/med
getsndoutcomp.htm
>
Solving this problem isn't as simple as you make it out to be. No amount of
>
bridging can make up for the facts that the Sound Manager has a fundamental
>
problem if an sdev dies on it in the middle of playback and it has no
>
abstractions for device discovery.
Sorry, I didn't mean to make it sound trivial. I'm just running into a
brick wall on OS X with QuickTime. Why have the above QuickTime functions
if they can't be used to discover audio devices? And why can't they be
bridged to CoreAudio/HAL's device discovery, like it does under OS 9 with
the Sound Manager?
>
Note that this doesn't happen on 9. When you unplug a USB Audio device, the
>
sdev switches back to the built-in hardware since it is all handled by the
>
same sdev. The Sound Manager remains blissfully ignorant of it all.
>
>
Jeff Moore
>
Core Audio
>
Apple
Again that might be true for some USB devices, but not all. The Telex P900
is another example. It can be plugged and unplugged as will, and it
registers itself with the Sound Manager (and QuickTime) as a second output,
in addition to Built-In.
Jeff, I'm not trying to beat anyone up here... I just need to figure out
what I'm going to do with all my QuickTime playback code on OS X ASAP!
Thank you for your patience and great support!
-Jason