• 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
how to set inputs and outputs in the AUmixer?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

how to set inputs and outputs in the AUmixer?


  • Subject: how to set inputs and outputs in the AUmixer?
  • From: Fredrik Jansson <email@hidden>
  • Date: Tue, 1 Dec 2009 12:08:23 +0000
  • Importance: Normal

I am trying and failing at getting the PlayFile.cpp example to work Nested Inside an audio Unit. I have a few problems that i would really appriciate some help on since the documentation for the fileplayerAU and the AUmixer seems non existant (i have searched around ALOT without finding anything).  This is my first problem but i get my mails bounced whenever there is any code in them so i hope this one gets through.  When trying to set the number of input channels for my mixer au what am i doing wrong ?

This is how i create my mixer  

    ComponentDescription cd;

    Component comp;

Mixer = new CAAudioUnit();

//Create the mixer------------------------------------

    cd.componentType = kAudioUnitType_Mixer;                         

cd.componentSubType = kAudioUnitSubType_Mixer;                                               

    cd.componentManufacturer = kAudioUnitManufacturer_Apple;      

    cd.componentFlags = 0;                                        

    cd.componentFlagsMask = 0;                                                  

    compMixer = FindNextComponent(NULL, &cd);                         

CAComponent* thecomponentmixer = new CAComponent(comp);          

    if (compMixer == NULL) exit (-1);                                  

err = CAAudioUnit::Open(*thecomponentmixer,*Mixer);

/*The first one of these calls succedes the other one fails which i find very illogical and contrary to the small ammount of documentation i have found*/

XThrowIfError (Mixer->SetNumberChannels(kAudioUnitScope_Output,0,4),"SetNumberChannels");//how can this sucede? is a mixer not N number of inputs to exaclty 2 outputs?

XThrowIfError (Mixer->SetNumberChannels(kAudioUnitScope_Input,0,2),"SetNumberChannels");//fails why?

What i want to do is set 3 inputs to 2 outputs. 

should i use some Mixer->SetProperty call instead ? how would that look ? 



Ladda ner nya Internet Explorer 8! Ladda ner nya Internet Explorer 8!
 _______________________________________________
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

  • Follow-Ups:
    • Re: how to set inputs and outputs in the AUmixer?
      • From: William Stewart <email@hidden>
  • Prev by Date: Re: Inconsistencies with large WAV file
  • Next by Date: buggy AUMatrixReverb, reaper ??
  • Previous by thread: Re: Detecting file completion of AUAudioFilePlayer playback
  • Next by thread: Re: how to set inputs and outputs in the AUmixer?
  • Index(es):
    • Date
    • Thread