Re: PlayThru (was: AudioUnit for default input device)
Re: PlayThru (was: AudioUnit for default input device)
- Subject: Re: PlayThru (was: AudioUnit for default input device)
- From: Jeff Moore <email@hidden>
- Date: Mon, 12 Nov 2001 11:36:10 -0800
on 11/12/01 10:51 AM, Lieven Dekeyser <email@hidden> wrote:
>
I then tried to set the playThru property (kAudioDevicePropertyPlayThru)
>
of the default input device to 1, but AudioDeviceSetProperty returns
>
kAudioDeviceUnknownPropertyError...
kAudioDevicePropertyPlayThru represents a physical connection between the
input section and the output section of a device. It is an on/off sort of
thing. Not all devices have this support. Further, it would only be for that
particular device which may or may not be the default device for both input
and output.
>
Is there an easy way get the default input device to play through the
>
default output device?
If the default input and the default output device are the same device and
that device presents them together in the IOProc (presuming
kAudioDevicePropertyPlayThru isn't supported), you can just copy the data
from the input buffers to the output buffers in your IOProc.
If the default input and the default output device are different devices.
You will have to deal with moving the data coming in from one IOProc to the
buffer going out in another IOProc. You could use a queue of some kind. Be
sure to copy the data out of the input buffers to your own buffers since
those buffers get reused by the HAL each cycle.
--
Jeff Moore
Core Audio
Apple