LEADTOOLS Image File Support (Leadtools.Codecs assembly)
LEAD Technologies, Inc

GetAudioData Method






Index of the audio stream to retrieve. The extensions may have more than one audio stream. This index is 0-based. Therefore, the first stream is stream 0, the second stream is stream 1, etc. To retrieve all the audio streams, retrieve the streams one by one until an empty Leadtools.RasterNativeBuffer is returned (empty Leadtools.RasterNativeBuffer will have a RasterNativeBuffer.Data set to IntPtr.Zero and RasterNativeBuffer.Length set to 0.
Gets the embedded audio data from the specified extension list. .NET support WinRT support
Syntax
public RasterNativeBuffer GetAudioData( 
   int stream
)
'Declaration
 
Public Function GetAudioData( _
   ByVal stream As Integer _
) As RasterNativeBuffer
'Usage
 
Dim instance As CodecsExtensionList
Dim stream As Integer
Dim value As RasterNativeBuffer
 
value = instance.GetAudioData(stream)
public RasterNativeBuffer GetAudioData( 
   int stream
)
 function Leadtools.Codecs.CodecsExtensionList.GetAudioData( 
   stream 
)
public:
RasterNativeBuffer GetAudioData( 
   int stream
) 

Parameters

stream
Index of the audio stream to retrieve. The extensions may have more than one audio stream. This index is 0-based. Therefore, the first stream is stream 0, the second stream is stream 1, etc. To retrieve all the audio streams, retrieve the streams one by one until an empty Leadtools.RasterNativeBuffer is returned (empty Leadtools.RasterNativeBuffer will have a RasterNativeBuffer.Data set to IntPtr.Zero and RasterNativeBuffer.Length set to 0.

Return Value

A Leadtools.RasterNativeBuffer object containing the audio data.
Remarks

The audio data is stored inside extensions in the WAVE format.

The audio data can be played directly from memory, or the data can be written to a disk file and played from the disk. When writing the audio data to a disk file, give the file a .WAV extension.

The audio data pointer returned is freed automatically when this CodecsExtensionList object is disposed. so do not try to free this memory.

Example
For an example, refer to RasterCodecs.ReadExtensions.
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

CodecsExtensionList Class
CodecsExtensionList Members
Exif File Extensions

 

 


Products | Support | Contact Us | Copyright Notices

© 2006-2012 All Rights Reserved. LEAD Technologies, Inc.