• 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: Why don't kAudioUnitSubType_NBandEQ support 48000
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why don't kAudioUnitSubType_NBandEQ support 48000


  • Subject: Re: Why don't kAudioUnitSubType_NBandEQ support 48000
  • From: Lucas Goossen <email@hidden>
  • Date: Tue, 29 Mar 2016 08:32:49 -0500

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@hidden> wrote:


On Mar 14, 2016, at 4:27 AM, Lucas Goossen <email@hidden> 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@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: 
 >Why don't kAudioUnitSubType_NBandEQ support 48000 (From: Lucas Goossen <email@hidden>)
 >Re: Why don't kAudioUnitSubType_NBandEQ support 48000 (From: James McCartney <email@hidden>)

  • Prev by Date: Musical time out of MusicSequence
  • Next by Date: Re: Musical time out of MusicSequence
  • Previous by thread: Re: Why don't kAudioUnitSubType_NBandEQ support 48000
  • Next by thread: CoreMIDI schedule ahead
  • Index(es):
    • Date
    • Thread