Re: Multiple output devices under CoreAudio with Quicktime
Re: Multiple output devices under CoreAudio with Quicktime
- Subject: Re: Multiple output devices under CoreAudio with Quicktime
- From: Jeff Moore <email@hidden>
- Date: Wed, 2 Jul 2003 11:29:02 -0700
Prior to Panther, neither the Sound Manager nor the HAL Output Audio
Unit do anything with kAudioDevicePropertyPreferredChannelsForStereo.
In fact, I'm unaware of any app that respects this setting prior to
Panther.
If you do go the CoreAudio route, you definitely want to go the Audio
Unit route rather than directly using the HAL. The reason why is that
the AU solution is much more flexible and you don't have to worry about
the complexities of being a proper HAL client.
On Wednesday, July 2, 2003, at 12:53 AM, Dave Addey wrote:
Hi Jeff,
Thanks for the advice! I've spent some time playing around with the
CoreAudio examples and looking inside the Daisy sample application,
and I
now understand *much* more about how the HAL works. I'm successfully
getting a list of available channels and streams, getting AudioDevices
and
their properties, and so on.
I noticed that there's a property I can set for an AudioDevice:
kAudioDevicePropertyPreferredChannelsForStereo = 'dch2',
// An array of two UInt32s where the first UInt32 indicates the
device
// channel number to use for the left channel and the second one
// indicates the device channel number to use for the right channel.
Would this allow me to set alternative default channels for the stereo
output of the SoundManager? And if so, would this be set for
*everything*
going through that AudioDevice, or could it be for different component
instances of this device?
My *main* question is, is there any way I can continue to use my
existing
QuickTime / SoundManager playback code for audio playback, and use the
HAL
API to route where this appears on the device? Or am I resigned to
writing
my own playback code and buffering the audio data to the required
channels
in the HAL? Is there some halfway-house solution with a chain of
components
/ AudioUnits linking the SoundManager output to the AudioDevice in the
desired way?
I'm loath to move away from my current playback approach if I have to
(as
QuickTime is doing a great job for me), but I'm happy to get my hands
dirty
with AudioDevices (..., AudioUnits, AUGraphs, etc.) for the output!
Of course, if the answer is 'no', then it's back to the drawing
board...
Thanks in advance,
Dave.
------------------------------------
Dave Addey
email@hidden
DJ-1800
Complete DJ solution for the Mac
http://www.dj1800.com/
On 20/6/03 8:26 pm, "Jeff Moore" <email@hidden> wrote:
The Sound Manager is stereo only and the channels it uses on a
multi-channel device is fixed to being the first two channels. If you
want to do more, you need to use an API that provides access to the
whole device like the HAL Output Audio Unit.
On Friday, June 20, 2003, at 9:13 AM, Dave Addey wrote:
Hi,
A few months ago, Jeff posted the reply below to a problem I was
having, and
it got everything working for me using multiple output devices under
OS X via
QuickTime. I found that this solution worked on all versions of OS
X with
QuickTime 6 installed - not just OS X 10.2.
However, users of my application are being demanding, and I have a
further
question...
I can now access hardware output devices, via QuickTime, using the
sdev
approach mentioned previously. However, if the hardware output
device has
(for example) 4 sets of stereo outputs, the corresponding sdev only
points to
one of these stereo outputs. So, I can output audio to the device,
but only
through one of its stereo outputs.
My question is this: is there a way (via this QuickTime / Sound
Manager
approach) to access the multiple channels (or streams) of an output
device
under OS X? Or if not, where should I start for finding and
outputting sound
to multiple channels of one device? And will this mean moving all
of my
other code away from QuickTime and SoundManager into some new
CoreAudio
world?
Sorry for the basic question, but I'm struggling to get started with
this!
Thanks in advance,
Dave.
_______________________________________________
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.