Yes, I discovered my error not long after sending the email. I forgot to send a disregard email. Thanks for the reply.
> On Mar 23, 2016, at 3:58 PM, James McCartney <[email protected]> wrote: > > >> On Mar 14, 2016, at 4:27 AM, Lucas Goossen <[email protected] >> <mailto:[email protected]>> wrote: >> >> If I ever try to set a kAudioUnitSubType_NBandEQ audio unit ASBD to 48000 >> sampling rate I get kAudioUnitErr_FormatNotSupported. I get around by >> converting but I am curious, why not support 48000? > > works for me. > > #include <AudioToolbox/AudioToolbox.h> > > int main(int argc, const char * argv[]) { > AudioComponentDescription desc = { 'aufx', 'nbeq', 'appl', 0, 0 }; > AudioComponent ac = AudioComponentFindNext(NULL, &desc); > AudioComponentInstance au; > OSStatus err = AudioComponentInstanceNew(ac, &au); > if (err) { > fprintf(stderr, "AudioComponentInstanceNew failed %d\n", > (int)err); > exit(1); > } > > UInt32 formatFlags = kAudioFormatFlagIsPacked | kAudioFormatFlagIsFloat | > kAudioFormatFlagIsNonInterleaved ; > AudioStreamBasicDescription asbd = { 48000., 'lpcm', formatFlags, 4, 1, > 4, 2, 32, 0 }; > > UInt32 propSize = sizeof(asbd); > err = AudioUnitSetProperty(au, kAudioUnitProperty_StreamFormat, > kAudioUnitScope_Input, 0, &asbd, propSize); > printf("set input format err %d\n", (int)err); > if (err) return 8; > err = AudioUnitSetProperty(au, kAudioUnitProperty_StreamFormat, > kAudioUnitScope_Output, 0, &asbd, propSize); > printf("set output format err %d\n", (int)err); > if (err) return 9; > > err = AudioUnitInitialize(au); > printf("initialize err %d\n", (int)err); > if (err) return 9; > > return 0; > } > > set input format err 0 > set output format err 0 > initialize err 0 > Program ended with exit code: 0 > > > > James McCartney > Apple CoreAudio > [email protected] <mailto:[email protected]> > > >
_______________________________________________ Do not post admin requests to the list. They will be ignored. Coreaudio-api mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/coreaudio-api/archive%40mail-archive.com This email sent to [email protected]
