Hi Cara,

I looked through the example you described 
(UsinganAUGraphwiththeMulti-ChannelMixerandRemoteIOAudioUnit). In the following 
section it is decided wich audio data is played:

Float32 *outA = (Float32 *)ioData->mBuffers[0].mData; // output audio buffer 
for L channel
        Float32 *outB = (Float32 *)ioData->mBuffers[1].mData; // output audio 
buffer for R channel
    
    // for demonstration purposes we've configured 2 stereo input busses for 
the mixer unit
    // but only provide a single channel of data from each input bus when asked 
and silence for the other channel
    // alternating as appropriate when asked to render bus 0 or bus 1's input
        for (UInt32 i = 0; i < inNumberFrames; ++i) {
        
        if (1 == inBusNumber) {
            outA[i] = 0;
            outB[i] = in[sample++];
        } else {
            outA[i] = in[sample++];
            outB[i] = 0;
        }
        
        if (sample > bufSamples) {
            // start over from the beginning of the data, our audio simply loops
            printf("looping data for bus %d after %ld source frames 
rendered\n", (unsigned int)inBusNumber, (long)sample-1);
            sample = 0;
        }
    }

Larissa

> Am 01.02.2016 um 18:52 schrieb Cara Quinn <[email protected]>:
> 
> Larissa,
> 
> Thank you very much for this.
> 
> I understand the concept of connecting nodes in an auGraph, so your code 
> makes perfect sense.
> 
> What I have not seen in the sample code is how to assign a specific audio 
> stream to a specific mixer input element.
> 
> If you like, please see my earlier note to Mahboud for some clarification on 
> what I am doing.
> 
> Let me revisit the AUGraphConnectNodeInput function to see if I am 
> overlooking something basic here and perhaps I can find what I need or at 
> least ask a better question.
> 
> I sure don’t want to waste your and others time. :)
> 
> Thanks so much for your note. You may have given me the direction I need.
> 
> Cheers!
> 
> Cara
> ---
> iOS design and development - LookTel.com
> ---
> View my Online Portfolio at:
> 
> http://www.onemodelplace.com/models/Cara-Quinn
> 
> Follow me on Twitter!
> 
> https://twitter.com/ModelCara
> 
> On Feb 1, 2016, at 5:05 AM, Larissa Laich <[email protected]> wrote:
> 
> Hi Cara,
> 
> I create a mixer node with kAudioUnitSubType_MultiChannelMixer in the audio 
> component description. When you say "channel“, are you talking about elements?
> An element is a programmatic context which is nested within an audio scope. 
> It is analogous to a signal bus in a physical device (if it is a part of 
> input or output scope) and that’s the reason why it is sometimes also called 
> a bus.
> 
> For example you can connect your output node (bus 0 (in output scope) is 
> directly connected to the speaker) with your mixer node like that:
> 
>   CheckError(AUGraphConnectNodeInput(self->graph, mainMixerNode, 0, 
> outputNode, 0),
>              "Couldn't connect mixer output on bus 0 to input scope bus 0 of 
> outputNode");
> 
> Best,
> Larissa
> 
> 
> 
>> Am 01.02.2016 um 05:46 schrieb Cara Quinn <[email protected]>:
>> 
>> Hello All, firstly thanks for this list!
>> 
>> My apologies for such a basic mixer question but I have been tasked with 
>> writing a VOIP application and have had no previous experience with audio 
>> units until just recently.
>> 
>> I am needing to add multi-channel support to the VOIP app at the moment so 
>> am researching the standard multi-channel mixer audio unit.
>> 
>> I have looked at some sample code (both from Apple and from third parties) 
>> to get an idea of what is happening and mostly get what is going on with one 
>> exception.
>> 
>> I cannot for the life of me, figure out where the channel or bus assignments 
>> are happening. I.E. if I have several audio streams, and I wish to assign 
>> each stream to a specific mixer input I cannot see where this is happening 
>> in any of the examples I am looking at.
>> 
>> Also, I have seen people say online that the busses and mixer channels are 
>> two different concepts but again, I cannot see in the code where this is 
>> demonstrated. So any help on the correct paradigm I should be thinking of 
>> this in terms of, would greatly be appreciated.
>> 
>> I am sure I must be overlooking something basic here so if anyone can point 
>> me in the right direction I would sure be grateful! :)
>> 
>> Thanks so much and please do have a great day!
>> 
>> Cheers!
>> 
>> Cara
>> ---
>> iOS design and development - LookTel.com
>> ---
>> View my Online Portfolio at:
>> 
>> http://www.onemodelplace.com/models/Cara-Quinn
>> 
>> Follow me on Twitter!
>> 
>> https://twitter.com/ModelCara
>> 
>> 
>> _______________________________________________
>> 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/larissa%40quappi.com
>> 
>> This email sent to [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]

Reply via email to