Re: Reading and writing from/to sound devices without AU
Re: Reading and writing from/to sound devices without AU
- Subject: Re: Reading and writing from/to sound devices without AU
- From: Ian Kemmish <email@hidden>
- Date: Thu, 10 Mar 2011 07:40:21 +0000
On 9 Mar 2011, at 19:18, Rick Mann <email@hidden> wrote:
I already wrote some code as an Audio Unit, and that works fine. But
there are times when I want to process the incoming data (which
happens to be in the audio spectrum, of sorts, but isn't necessarily
audio data) and produce something that is distinctly NOT audio. In
this case, I won't be outputting any sounds, and Core Audio won't be
calling me to ask for samples.
So the audio stream is multiplexed with out of band data?
To handle the data, I'd buffer it up in the AU, and send a
notification to the host that some data is ready. (Or have the host
poll if the exact timing isn't critical.)
As for the rest, I can see two scenarios:
1) The audio stream is continuous, and the data is merely interpolated
in it. In that case, your Au simply keeps reading samples from your
device until it has filled the audio buffer which CoreAudio has asked
it to fill.
2) The audio stream is to be muted while the data is being received.
In that case you just fill the buffer with zeroes.
How gracefully your device works if it's not immediately connected to
your AU, or your AU works if it's not immediately downstream of your
device, well, that's up to you....
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - -
Ian Kemmish 18 Durham Close, Biggleswade, Beds
SG18 8HZ
email@hidden Tel: +44 1767 601361 Mob: +44 7952
854387
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - -
_______________________________________________
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