के बीच मात्रा ड्रॉप स्विचिंग मेरे ऐप में मैं इन 2 अलग AudioUnits के बीच स्विच करने की जरूरत है। जब भी मैं वीपीआईओ से रिमोटियो में स्विच करता हूं, तो मेरी रिकॉर्डिंग वॉल्यूम में एक बूंद होती है। काफी महत्वपूर्ण गिरावट। हालांकि प्लेबैक वॉल्यूम में कोई बदलाव नहीं। किसी को भी इसका अनुभव हुआ?रिकॉर्डिंग RemoteIO और VPIO
यहां कोड है जहां मैं स्विच करता हूं, जो रूटिंग परिवर्तन से ट्रिगर होता है। (मुझे यकीन नहीं है कि मैंने सही ढंग से बदलाव किया है, इसलिए मैं यहां भी पूछ रहा हूं।)
रिकॉर्डिंग वॉल्यूम ड्रॉप की समस्या को मैं कैसे हल करूं?
धन्यवाद, किसी भी मदद मैं प्राप्त कर सकते हैं की सराहना करते हैं।
पियर।
- (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, ¤tOutputUnit);
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];
}
}
हाय चट्टानी, मैंने कोशिश की है। क्योंकि मैं AUGraphNodeInfo (theGraph, remoteionode, 0, और _remoteIOUnit) का उपयोग करता हूं; रिमोटियो उदाहरण प्राप्त करने के लिए, ऐसा लगता है कि मैं AudioComponentInstanceDispose (यह क्रैश) का उपयोग नहीं कर सकता। मैंने उस पोस्ट को पढ़ लिया है जिसके बारे में आप बात कर रहे हैं। मेरे लिए काम नहीं लग रहा है:/ – lppier