Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: PlayThru (was: AudioUnit for default input device) (fwd)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: PlayThru (was: AudioUnit for default input device) (fwd)



> > 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.




Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.