0
Hi I was hoping that there's a way (such as an class I can inherit from and override) for me to route someone's voice through core audio so I can do fun stuff to their voice like put effects on it or other things. I don't recall this bein possible in the sdk (only audiosession, no core audio interface) and was wondering if it's on the radar. Thanks!
Responses (3)
  • Accepted Answer

    Monday, March 07 2016, 08:05 AM - #Permalink
    0
    Hi Russel,
    we don't have this at the moment, but we may be able to offer it as custom extension to the SDK.
    We are using AUGraph methods to access audio. So, we could add some kind of filter to the graph.
    I need some more information on your requirements to detail this out.

    Best regards,

    Michael
    The reply is currently minimized Show
  • Accepted Answer

    Saturday, March 12 2016, 02:36 AM - #Permalink
    0
    Hi Michael,

    My requirements:
    1. i need control the volume of the incoming voice independently from the system volume; i had asked about this a couple years back, but at that time didn't realize you were using an AUGraph. So, to do this, we'd need to just add a mixerNode to the graph channel that has the incoming voice. I'm not sure if all the incoming voices are on a single channel or multiple channels, but if they are only on one, then one mixerNode would do. If on multiple (preferred actually), then an array would be cool, or see option #2 below to add my own nodes.
    2. I need to know if anything is coming through on the voice; i had asked about this too, but again, this is easily solvable if you use an AUGraph by me calling into AudioUnitGetParameter for the kMultiChannelMixerParam_PostAveragePower on the mixer channel. Again, this is just another node to add to the graph under each voice channel

    Here's my requirements as stated in a post from a while ago: https://www.c2call.com/en/sdk-forum/separate-volume-control-and-voice-presence.html

    Adjusting the volume and get a reading of what's coming out of the voice - these seem like two handy things.

    So, to solve my requirements, you have two options :

    Option 1: You could add a Mixer AudioUnit to your chain and expose that Mixer AudioUnit somewhere publicly (even statically)... This would help anyone else too who wants to satisfy the above requirements and no more...

    If you exposed a mixer audio unit that controls the volume of the bus that contains the voice data, then i could simply use code like this:

    Get the meter:
    float power = 0;
    OSStatus result = AudioUnitGetParameter(mMixer,
    kMultiChannelMixerParam_PostAveragePower,
    kAudioUnitScope_Input,
    busID,
    &power);

    Set the volume:
    OSStatus result = AudioUnitSetParameter (mMixer,
    kMultiChannelMixerParam_Volume,
    kAudioUnitScope_Output,
    0,
    volume,
    sizeof(volume));

    That would be cover my requirements and be awesome!

    Option 2:
    If you wanted to go to the next level and let people do as they wish to your audio chain (add effects, etc.. etc.. sky's the limit), then you would want to expose a method like this so stuff can be added to your graph:

    -(BOOL)connectOutputBus:(UInt32)sourceOutputBusNumber ofNode:(AUNode)sourceNode toInputBus:(UInt32)destinationInputBusNumber ofNode:(AUNode)destinationNode inGraph:(AUGraph)graph error:(NSError **)error {

    In this case, I'd override some class and this method so i would add an AUNode mixerNode, and the AudioUnit mixer on that node. This would also be helpful to add AURenderCallbackStruct calls within the chain. So, in the case of the meter.. it's always changing based on what's coming through, so it might be best to use a render callback to get the PostAveragePower and stick it into a variable... but i guess that's not as important because the code that reads the PostAveragePower will probably be a callback itself and it can probably just directly call the mixer you expose in option #1..

    In conference mode, if your architecture uses separate tracks in the graph for each person, that's even better. In that case, I'd like those exposed separately too (as an array, I assume, or in option 2, somehow the overload getting called each time a new person joins the conference so separate nodes can be added to each bus) so I could control each person independently and also get each of their Power so i can use it to set thresholds. A common use case for this might be if one person in a group is in a server farm with a lot of hum. I'd want to set them to only come through if their voice gets loud above some set threshold. Or, if one person i can barely hear and another is really loud, i can adjust their volumes as needed.

    Make sense?
    Think it could happen?

    russ
    The reply is currently minimized Show
  • Accepted Answer

    Monday, March 14 2016, 04:09 PM - #Permalink
    0
    Hi Russel,
    let me revalidate your email by end of the week. I'm traveling until Thursday and will be back in the office on Friday.
    I need to check what's the best way. If I can relatively effortless just expose the mixer, I can do. I'm not sure. I think I have a mixer on output side but not on input at the moment. But I will clarify and get back to you.
    Just ping me again if you don't hear back. I'm pretty busy these days.

    Best regards,

    Michael
    The reply is currently minimized Show
Your Reply

About us

C2Call GmbH leads the way in introducing next generation mobile and browser-based calling solutions for the computing cloud. FriendCaller for iOS and Android are built using C2Call SDK, and demonstrate the unique capabilities to establish a peer-to-peer connection with any mobile platform and with any Internet browser without prerequisite software installations. With the new C2Call SDK, developers would now be able to integrate features alike FriendCaller in their existing or new apps on mobile.