In Search of Audio I/O
In Search of Audio I/O
- Subject: In Search of Audio I/O
- From: "Richard Furse" <email@hidden>
- Date: Wed, 4 Jun 2008 12:14:20 +0100
Title: In Search of Audio I/O
Hi there - I've recently acquired my first ever Mac, onto which I'm attempting to port some audio code. Mostly this has been proving pleasantly straightforward - gcc works fine, wxWidgets, BLAS/LAPACK and an FFT implementation were already on the box etc etc. All nice and shiny on that side!
But, I'm having trouble working out how to access the audio hardware through native calls. I need to be able to:
1. Enumerate "devices" (exact definition flexible)
2. Find out what input and output channels are present on each device, with as much meta-data as possible (labels are critical, plus it would be great if the OS could tell me if there is a 7.1 array attached or suchlike)
3. Stream audio to and from one of these devices synchronously at a fixed sample rate of my choosing
4. Find out the round-trip latency from output to input
5. Clean everything up after use so I can go back to the first step here without having to restart my binary
I can manage the first step using code based on the AudioDeviceList class from the CAPlayThrough sample code, though I cannot find corresponding API documentation. On step two, I start to get scared - my MOTU896 reports two separate "buffers" (what are they?) for its analogue and digital channels. And I'm struggling to find channel labels (the MOTU appears to number them from 1 in one block, the built-in and aggregate devices don't return labels at all so far). At step three, I've an AUHAL object that looks happy enough, but I'm not clear what state change logic I should be using and what properties apply when. I'm receiving an error code -10865 (what's that?) when I try to set stream properties on AUHAL - and I really have no idea what I'm doing! :-)
I'm guessing there's a body of knowledge out there on this sort of thing and probably a bunch of people on this list finding the above rather obvious and annoying. Apologies for that. I'm extremely happy to RTFM if someone can point me in the right direction, but at the moment I can find nothing between overview documents and samples/header files. Alternatively, if Core Audio is a bit of an "organic" thing where the knowledge is primarily in people's heads, is this list the right place to be asking around?
Any help much appreciated!
Best wishes,
--Richard
_______________________________________________
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