Re: simplest sound output
Re: simplest sound output
- Subject: Re: simplest sound output
- From: Roland Silver <email@hidden>
- Date: Thu, 27 Mar 2008 10:05:52 -0600
Peter, Thanks for your suggestion! My understanding of the complexities of core audio is sufficiently weak so that I'm not sure how to use your suggestion to generate actual C-code. Can you help? --RS On 2008Mar27, at 07:23, Peter Rebholz wrote: Roland,
I don't think you should have do much conversion your self, I think float/double values between 1 and -1 are a commonly used format for core audio. I'm fairly new to core audio myself but I believe if you get the AudioStreamBasicDescription of your default output unit (AudioUnitPropertyID: kAudioUnitProperty_StreamFormat) for the input scope, you should be able to to change it to match the data that you have and then set the property back with the changes that you made. This tells the output unit what format to expect data in. Then, in your render callback you should be able to populate the AudioBufferList based on the stream description you provided.
If you can set the input stream format of the default output directly you should be able to create an instance of AudioConverter and set the input format to match your data and the output format to match the default output's format.
Someone correct me if I'm wrong!
Peter
|
_______________________________________________
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