I'm trying to read amplitude parameter essence data from an AAF file however I've run in to some problems with accessing the IEnumAAFParameterDefs type data. Following are a couple lines of code. The last line is really where I should be getting the parameter definitions and storing it in the pointer to ppEnumAmpl (which is an IEnumAAFParameterDefs type) however I'm having trouble actually accessing that data. I would like to simply print the amplitude parameter data to a txt file but I can't seem to get a clear understanding of the methods of that object.
To see how to iterate over IEnumAAF elements try searching 'examples' and 'test' for the NextOne call. Basically you need to do the following:
IAAFParameterDef* pd = 0;
while( SUCCEEDED(ppEnumAmpl->NextOne(&pd)) )
{
// work with pd
...
pd->Release();
pd = 0;
}
I am not sure though why you would want to iterate over all the parameter definitions registered in the dictionary because that's what you'll get from the your last call. The previous two calls have already returned the definitions for MonoAudioGain and Amplitude.
Alexey
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi all,
I'm trying to read amplitude parameter essence data from an AAF file however I've run in to some problems with accessing the IEnumAAFParameterDefs type data. Following are a couple lines of code. The last line is really where I should be getting the parameter definitions and storing it in the pointer to ppEnumAmpl (which is an IEnumAAFParameterDefs type) however I'm having trouble actually accessing that data. I would like to simply print the amplitude parameter data to a txt file but I can't seem to get a clear understanding of the methods of that object.
pDictionary->LookupOperationDef(kAAFOperationDef_MonoAudioGain, &pOperDefGain);
pDictionary->LookupParameterDef(kAAFParameterDef_Amplitude, &pParmDefAmpl);
pDictionary->GetParameterDefs(&ppEnumAmpl)
Thanks for any help that can be given.
-Justin
To see how to iterate over IEnumAAF elements try searching 'examples' and 'test' for the NextOne call. Basically you need to do the following:
IAAFParameterDef* pd = 0;
while( SUCCEEDED(ppEnumAmpl->NextOne(&pd)) )
{
// work with pd
...
pd->Release();
pd = 0;
}
I am not sure though why you would want to iterate over all the parameter definitions registered in the dictionary because that's what you'll get from the your last call. The previous two calls have already returned the definitions for MonoAudioGain and Amplitude.
Alexey