MFAudioGetBytes Method (MFFrameClass)
size of audio data
pointer to audio data
Gets audio data pointer and data size
Syntax
Public Overridable Sub MFAudioGetBytes( _
   ByRef _pcbSize As Integer, _
   ByRef _ppbAudio As Long _
) 
public virtual void MFAudioGetBytes( 
   out int _pcbSize,
   out long _ppbAudio
)
public procedure MFAudioGetBytes( 
   Out  _pcbSize: Integer;
   Out  _ppbAudio: Int64
); virtual; 
public: virtual void MFAudioGetBytes( 
   [PARAMFLAG::Out] int _pcbSize,
   [PARAMFLAG::Out] long _ppbAudio
) 

Parameters

_pcbSize
size of audio data
_ppbAudio
pointer to audio data
Example

Here is an example of how to get a frame and get audio data's size and pointer:

                
m_objMFReader = new MFReaderClass();
m_objMFReader.ReaderOpen(sourceFileName, "");
m_avProps = new M_AV_PROPS(); // set video format for conversion
m_avProps.vidProps.eVideoFormat = eMVideoFormat.eMVF_HD1080_5994i;
MFFrame pFrame = null;
// Get next frame or frame by position
if (m_objMFReader != null)
    m_objMFReader.SourceFrameConvertedGetByTime(ref m_avProps, -1, -1, out pFrame, "");
int audioSize;
long audioPointer;
pFrame.MFAudioGetBytes(out videoSize, out videoPointer);
See Also

Reference

MFFrameClass Class
MFFrameClass Members