Re: PlayThru (was: AudioUnit for default input device) (fwd)
Re: PlayThru (was: AudioUnit for default input device) (fwd)
- Subject: Re: PlayThru (was: AudioUnit for default input device) (fwd)
- From: Lieven Dekeyser <email@hidden>
- Date: Mon, 19 Nov 2001 20:02:26 +0100 (CET)
>
> 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.
Yep... got that to work just fine. Thanks for the suggestion. I found the
code I needed in the Daisy sample code from Apple.
>
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.
I tried to copy the AudioBufferLists and put these copies in a queue, but
it didn't work :-(
Are the IOProcs fired at interrupt time? If so, I guess calling malloc and
memcpy isn't allowed, right? How do you copy the bufferdata?
any help would be appreciated!
greetz,
Lieven
ps: I'm sorry if you get this mail twice. It seemed as though it wasn't
sent.