0 Replies
      Latest reply on Mar 22, 2020 10:47 AM by HN - Paris
      HN - Paris Level 1 Level 1 (0 points)


        I know how to implement AURenderCallbacks in an AVAudioEngine using the audioUnits of the input or output nodes.

        In my new project, I would have to create an AVAudioUnit node to connect my AuRenderCallback to it, but whatever I do, this creation does not work: I read with NSLog "aUnit = (null)".


        I followed the advice in this discussion:


        My code is :

        AVAudioEngine *audioEngine;

            AVAudioPlayerNode *player;     //I'll need a PlayerNode and a SamplerNode in my project

            AVAudioUnit *aUnit;     //this one will analyse the audio of the player


        When I create the graph (with AVAudioEngine) :

        [AUAudioUnit registerSubclass:aUnit.class asComponentDescription:desc name:@"HerveNoury:TestCaptureAudioRythm" version:67072];

            [AVAudioUnit instantiateWithComponentDescription:desc options:0 completionHandler:^(AVAudioUnit * unit, NSError *error) {

                self->aUnit = unit;

               //[self->audioEngine attachNode:self->aUnit];

                NSLog(@"AVAudioUnit: %@, error: %@", unit.description, error);



        I added to the info.plist the NSExtension > AudioComponents :


























        What am I doing wrong that explains that the AVAudioUnit is never instantiated?


        Thank you in advance for your help.