Beispiel #1
0
void		CAAUMIDIMap::RestoreFromMapPList (const CFDictionaryRef inData, AUParameterMIDIMapping* outMappings, UInt32 inNumMappings)
{

	CACFDictionary dict (inData, false);
	
	if (dict.HasKey (kParamMIDIStr)) 
	{
		CFArrayRef cfArray;
		dict.GetArray (kParamMIDIStr, cfArray); 
		
		CACFArray array (cfArray, false);
		
		UInt32 count = array.GetNumberItems();
		if (count > inNumMappings)
			count = inNumMappings;
		
		for (unsigned int i = 0; i < count; ++i)
		{
			CFDictionaryRef paramsDictRef;
			if (!array.GetDictionary(i, paramsDictRef)) 
				return;
			
			CAAUMIDIMap parameterMap;
			parameterMap.Restore(paramsDictRef);
			outMappings[i] = parameterMap;
		}
	}
}
Beispiel #2
0
UInt32		CAAUMIDIMap::NumberOfMaps (const CFDictionaryRef inData)
{
	CACFDictionary dict (inData, false);
	
	if (dict.HasKey (kParamMIDIStr)) 
	{
		CFArrayRef cfArray;
		dict.GetArray (kParamMIDIStr, cfArray); 
		
		CACFArray array (cfArray, false);
		
		return array.GetNumberItems();
	}
	return 0;
}