• 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: Drop in volume switching from VPIO to RemoteIO
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Drop in volume switching from VPIO to RemoteIO


  • Subject: Re: Drop in volume switching from VPIO to RemoteIO
  • From: Pier <email@hidden>
  • Date: Fri, 14 Dec 2012 19:46:35 +0800

Anyone? I'm still rather stuck with this :/ 


On Mon, Dec 10, 2012 at 8:47 PM, Pier <email@hidden> wrote:
Hi there, 

In my app I need to switch between these 2 different AudioUnits. 
Whenever I switch from VPIO to RemoteIO, there is a drop in my recording volume.  Quite a significant drop. 
No change in the playback volume though.Anyone experienced this? 
 
Here's the code where I do the switch, which is triggered by a routing change. (I'm not too sure whether I did the change correctly, so am consulting you guys here) 

Thanks. 

Pier. 

- (void)switchInputBoxTo : (OSType) inputBoxSubType

{

    OSStatus result;


    if (!remoteIONode) return; // NULL check

    

    // Get info about current output node

    AudioComponentDescription outputACD;

    AudioUnit currentOutputUnit;

    

    AUGraphNodeInfo(theGraph, remoteIONode, &outputACD, &currentOutputUnit);


    if (outputACD.componentSubType != inputBoxSubType)

    {

        AUGraphStop(theGraph);

        AUGraphUninitialize(theGraph); 

        result = AUGraphDisconnectNodeInput(theGraph, remoteIONode, 0);

        NSCAssert (result == noErr, @"Unable to disconnect the nodes in the audio processing graph. Error code: %d '%.4s'", (int) result, (const char *)&result);

        AUGraphRemoveNode(theGraph, remoteIONode);

        // Re-init as other type


        outputACD.componentSubType = inputBoxSubType;

        // Add the RemoteIO unit node to the graph

        result = AUGraphAddNode (theGraph, &outputACD, &remoteIONode);

        NSCAssert (result == noErr, @"Unable to add the replacement IO unit to the audio processing graph. Error code: %d '%.4s'", (int) result, (const char *)&result);

        

        result = AUGraphConnectNodeInput(theGraph, mixerNode, 0, remoteIONode, 0);

        // Obtain a reference to the I/O unit from its node

        result = AUGraphNodeInfo (theGraph, remoteIONode, 0, &_remoteIOUnit);

        NSCAssert (result == noErr, @"Unable to obtain a reference to the I/O unit. Error code: %d '%.4s'", (int) result, (const char *)&result);

        

        //result = AudioUnitUninitialize(_remoteIOUnit);

        

        [self setupRemoteIOTest]; // reinit all that remoteIO/voiceProcessing stuff

        [self configureAndStartAudioProcessingGraph:theGraph];

    }  

}



--
Pier.



--
Pier.
 _______________________________________________
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: 
 >Drop in volume switching from VPIO to RemoteIO (From: Pier <email@hidden>)

  • Prev by Date: audio queue and progressive download
  • Next by Date: Plugins validate but don't appear in Garageband or Ableton Live
  • Previous by thread: Drop in volume switching from VPIO to RemoteIO
  • Next by thread: Plugins validate but don't appear in Garageband or Ableton Live
  • Index(es):
    • Date
    • Thread