huge memory usage in ReadSamples()?

jiminkster
2005-03-09
2013-04-29
  • jiminkster
    jiminkster
    2005-03-09

    Hi..
    i'm successfully extracting WAVE audio data from an AAF file...
    I have an IAAFEssenceAccess through which i'm calling CountSamples(), then ReadSamples()....
    i've noticed in my task manager, however, that the app is chewing up huge amounts of RAM while this is going on... for example, if the file contains 4 WAVE files of 10MB each, i'm chewing up approx 40MB or RAM (this is just an example, i have situations where potentially thousands of MB of RAM could be eaten)...
    this is not a leak on my end, it's happening somewhere in the ReadSamples() call...
    (i release my pEssenceAccess when finished extracting the file)...

    when the entire import operation is completed, the ram drops back down to where it started (so i guess it's not a leak)...
    is there something i'm missing out on???

    any help appreciated...

     
    • Thomas Estrade
      Thomas Estrade
      2005-06-14

      Hi,
      I'll try to answer, but I'm not qualified for.

      Do you wanna read all samples of the file embedded, or do you read sample per sample until the end of the file?

       
    • What idiom are you using to read the audio samples?  E.g.

        while true
           read 2000 audio samples
           break if EOF or END_OF_DATA

      I have used ReadSamples to read video and audio essence from large AAF files around 10GB in size to test scalability.  In those tests I had less memory than the size of the data in the AAF files.  By monitoring the tests I observed no more than 10MB of memory in use at any time using ReadSamples.