Re: 64bit processing possible?
Re: 64bit processing possible?
- Subject: Re: 64bit processing possible?
- From: William Stewart <email@hidden>
- Date: Mon, 3 Aug 2009 11:49:46 -0700
all that you need to do is:
- accept an ASBD that describes a 64bit float sample description.
That would look something like (for an AU using deinterleaved, the
ASBD describes the format of one channel)
AudioStreamBasicDescription streamFormat;
streamFormat.mFormatID = kAudioFormatLinearPCM; // the specific
encoding type of audio stream
streamFormat.mFormatFlags = kAudioFormatFlagsNativeFloatPacked
| kAudioFormatFlagIsNonInterleaved; // we want native ordered,
packed, floating point, deinterleaved
streamFormat.mBytesPerPacket = sizeof(Float64);
streamFormat.mBytesPerFrame = streamFormat.mBytesPerPacket;
streamFormat.mFramesPerPacket = 1;
streamFormat.mBitsPerChannel = 64;
streamFormat.mChannelsPerFrame = myNumChannels;
streamFormat.mSampleRate = mySampleRate;
So - your AU would see this kind of ASBD from its host. Then it knows
that the audio data it gets is 64bit float.
You would have to overide this check in AUBase, where it is checking
the format against the AU Canonical definition, specifically:
bool MyAUDoubleClass::ValidFormat(AudioUnitScope inScope,
AudioUnitElement inElement,
const CAStreamBasicDescription & inNewFormat)
(You can see how this is used in AUBase::DispatchSetProperty - case
kAudioUnitProperty_StreamFormat)
That's it.
Bill
On Aug 2, 2009, at 8:49 AM, Alejandro wrote:
Bill,
You asserted that it is possible to create an Audio Unit with 64bit
external format support. I have never created an AU, but how is this
done?
Thank you,
Alejandro
--
Alejandro Palencia
Open Studio Networks
www.openstudionetworks.com
+34 667440770
_______________________________________________
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
_______________________________________________
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