Re: Forwarding Audio from an Output Device to a different output device
Re: Forwarding Audio from an Output Device to a different output device
- Subject: Re: Forwarding Audio from an Output Device to a different output device
- From: Daniel Vollmer <email@hidden>
- Date: Wed, 14 Nov 2012 13:40:53 +0100
This is me thinking out loud again:
On 12 Nov 2012, at 12:50, Daniel Vollmer <email@hidden> wrote:
> I decided I wanted to learn something about CoreAudio, and had an idea for a small project:
> Essentially I want to present a (virtual) 6-Channel Output interface, the audio sent to which is
> encoded into AC3 and then sent to a different output device as SP/DIF stream.[1]
>
> From the AudioServerPlugIn sample NullAudio, I can quite easily present such an output device and
> receive audio sent to it. My current question is now: How do I forward that audio (or a processed version
> thereof) to a different, hopefully real output device?
> The trouble lies with the following quote from AudioServerPlugIn.h
> "First and foremost, an AudioServerPlugIn may not make any calls to the client HAL API in the
> CoreAudio.framework. This will result in undefined (but generally bad) behavior."
>
> What API can I use to open and forward data to a different device (inside the driver for my virtual output device)?
> Do I need to use an IOKitUserClient, i.e. forward captured audio to a user-space client that can then sent
> it using the normal CoreAudio API to a different output device?
> Are there other options?
My current thinking is that the best way to do this would be:
(1) Write an AudioServerPlugIn / User-Space driver that provides a virtual output device that forwards its received data to a virtual input device
(2) Write an AudioCodec that encodes linear PCM to AC3
(3) Write a user-space program that opens the virtual input device (provided by (1)), provides that data to the AudioCodec (2), and then outputs the encoded stream to a "real" output device.
I'm not quite sure I understand CoreAudio's notion of timing yet, but I hope that will come to pass once I actually get going...
Daniel.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden