Getting a list of Sound Output devices - TN1108 out of date.
Getting a list of Sound Output devices - TN1108 out of date.
- Subject: Getting a list of Sound Output devices - TN1108 out of date.
- From: Mark Gilbert <email@hidden>
- Date: Sun, 1 Aug 2004 10:51:59 +0100
Folks.
My app allows a user to select a sound output for playback of sound.
I create a menu of the available output devices, the user selects
one, and then I use that OSType when I create a sound channel with
the sound manager.
According to Apple documentation, TN1108, we are told that we can
pass an OSType along with the selector kUseOptionalOutputDevice into
SndNewChannel to allow us to use an optional sound output channel for
audio playback.
The same technote also explains how to build a list of output
devices, using FindNextComponent, with 'sdev' as the componentType.
However, when you run this code in OSX, you do NOT get the results
you expect. Rather than seeing a list of output devices similar to
those found in the Sound Preferences Output panel (it is a manual
select here that we are trying to automate), you instead get a blank
entry, followed by 'Firewire DV', and 'Mac OS X Hal Audio', which
are clearly not the same class of device as those appearing in Sound
Prefs, and as far as I know you cannot direct sound to the Firewire
DV directly with SndNewChannel.
Can anyone explain how to get the appropriate list of output options,
as per the Sound Prefs Output panel, to be used with SndNewChannel ?
I will also want to connect the same device as a target output for
the speech manager. Currently I do this by creating a sound channel,
then attaching this to the Speech channel, although I believe it may
be possible to do that directly.
If possible I would prefer to stick to the Sound Manager (for OS9
compatibility) rather than use CoreAudio. This is a very simple
requirement to play a beep and a bit of speech out of a particular
device. However, this app could use CoreAudio if that was the only
way.
On a related note, I have noted that some code written for OS9
originally, which feeds (what used to be) OSType devices to QuickTime
tracks as media output devices is no longer working. it would appear
that the whole OSType audio output device mechanism has fundamentally
changed in OSX. I think I used to use OSTypes like 'awgc' for Apple
Built In, 'USB ' for USB Audio device, and 'DGSO' for Digidesign's
sound driver. I recall that these OSTypes where gathered from the
same FindNextComponent code, but running under OS9.
Anyone care to update TN1108 for OSX ?
Thanks
Mark Gilbert
--
email@hidden
Tel: +44 208 340 5677
fax: +44 870 055 7790
http://www.gallery.co.uk
http://www.mtools.info
http://www.metaflow.info
http://www.virtualvtr.com
http://www.libraryloader.com
New Product !!!
http://www.pictureready.com
_______________________________________________
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.