• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: 64bit processing possible?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
References: 
 >Re: 64bit processing possible? (From: Alejandro <email@hidden>)

  • Prev by Date: Re: Audio Converter
  • Next by Date: Issues for loading an array of data into a stream buffer
  • Previous by thread: Re: 64bit processing possible?
  • Next by thread: Re: 64bit processing possible?
  • Index(es):
    • Date
    • Thread