Realtime AC3 mixer plugin for Core Audio
Realtime AC3 mixer plugin for Core Audio
- Subject: Realtime AC3 mixer plugin for Core Audio
- From: Ryan Walklin <email@hidden>
- Date: Wed, 5 Aug 2009 00:28:58 +1200
Hi,
I contribute to the open-source media player Plex (www.plexapp.com), and recently rewrote the audio output portion to use Core Audio. I implemented AC3 passthrough at the time, and took the opportunity to implement an AC3 encoder which converts multichannel PCM (ie from AAC or FLAC sources) to AC3 packets (within the render callback), and then passes them through in the same manner as pre-encoded AC3 tracks.
This works well within Plex, however I am keen to extend this functionality to the rest of the system via a Core Audio plugin. I've been reviewing the documentation in the various APIs in the last couple of weeks, but am struggling to identify the best solution.
My options as I see them are:
- An effect/conversion Audio Unit. This would work for apps which are able to connect AUs via an Audio Graph, but would be unavailable to Quicktime and the rest of the system.
-An audio codec which accepts multichannel PCM and produces an AC3 stream. Presumably QT etc would automatically select this if playing multichannel PCM to an optical device set to encoded output, but there doesn't seem to be a way to override the default 2 channel downmixing that usually occurs.
-An AUHAL/Hardware plugin which performs the encoding on the fly, or a virtual device which presents 6 channels.
I'd prefer to avoid device drivers if I can, as neither C++ or IOKit are my forte, but essentially I would like to present a 6 channel mixable device to the system, then perform real-time AC3 encoding (which is straightforward given buffer access in a callback or similar with my existing code) and play the output via SPDIF.
I'd appreciate any feedback on the best approach, and if that turns out to be a hardware plugin or virtual device, so be it.
Regards,
Ryan Walklin www.testtoast.com
|
_______________________________________________
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