Re: How to process a buffer of 64-bit audio using an unconnected Audio Unit
Re: How to process a buffer of 64-bit audio using an unconnected Audio Unit
- Subject: Re: How to process a buffer of 64-bit audio using an unconnected Audio Unit
- From: Michael Norris <email@hidden>
- Date: Thu, 08 Aug 2013 21:46:21 +1200
Just to follow up on this, it turned out that the callback procedure was running fine, but I was making too many assumptions about the stream format of the AU. I had assumed that the AU could handle an incoming buffer of doubles, whereas in fact it could only do Float32s.
Can anyone give a quick overview of the current state of 'double support' for Audio Units? Would the following be the correct code to ascertain whether an AU has double support?
AudioStreamBasicDescription asbd;
asbd.mSampleRate = sys_getsr();
asbd.mFormatID = kAudioFormatLinearPCM;
asbd.mFormatFlags = kAudioFormatFlagsAudioUnitCanonical;
asbd.mBytesPerPacket = sizeof(double);
asbd.mFramesPerPacket = 1;
asbd.mBytesPerFrame = sizeof(double);
asbd.mChannelsPerFrame = 1;
asbd.mBitsPerChannel = 8 * sizeof(double);
asbd.mReserved = 0;
result = AudioUnitSetProperty (x->audioUnit,
kAudioUnitProperty_StreamFormat,
kAudioUnitScope_Input,
0, &asbd, sizeof(asbd));
FYI, this gives a -10868 (format not supported) on even the built-in Apple AUs.
M
_______________________________________________
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