Copyright © 2006-2018 MultiMedia Soft

RecordedSound.RequestExportToFile method

Previous pageReturn to chapter overviewNext page

Remarks

 

Requests to resample and export the given sound range into a file.

 

A successful call to this method will fire the SoundExportStarted event. Once the exporting session has been performed completely, the control will fire the SoundExportDone event. Exporting advancement can be controlled through the SoundExportPerc event.

 

For further details about recorded sound methods refer to the RecordedSound object section.

For further details see the How to export a recorded sound section.

 

 

Syntax

 

[Visual Basic]

control.RecordedSound.RequestExportToFile (

nFrequency as Long,

nChannels as Long,

nBitsPerSample as Long,

nStartPosition as Long,

nEndPosition as Long,

strPathname as String

) as enumErrorCodes


 

[C++]

short control.RecordedSound.RequestExportToFile (

long nFrequency,

long nChannels,

long nBitsPerSample,

long nStartPosition,

long nEndPosition,

LPCTSTR strPathname

);


 

 

Parameter

Description

 

 

nFrequency

Frequency used to resample the sound to export (44100, 22050, etc.). This parameter is ignored when the EncodeFormats.ForExporting property is set to ENCODING_FORMAT_WMA and the EncodeFormats.WMA.EncodeMode property is set to WMA_ENCODE_PROFILE.

nChannels

Number of channels used to resample the sound to export (1 for Mono or 2 for Stereo). This parameter is ignored when the EncodeFormats.ForExporting property is set to ENCODING_FORMAT_WMA and the EncodeFormats.WMA.EncodeMode property is set to WMA_ENCODE_PROFILE.

nBitsPerSample

Number of bits per sample used to resample the sound to export (8 or 16). This parameter is ignored when the EncodeFormats.ForExporting property is set to ENCODING_FORMAT_WMA and the EncodeFormats.WMA.EncodeMode property is set to WMA_ENCODE_PROFILE.

nStartPosition

Start position, expressed in milliseconds, of the sound range to export

nEndPosition

End position, expressed in milliseconds, of the sound range to export. If set to -1 the end position will be set to the end of the sound.

strPathname

String containing the absolute pathname of the destination file. If this pathname should contain invalid characters, they would be automatically changed into an underscore '_' character.

 

 

Return value

 

Value

Meaning

 

 

Negative value

An error occurred, check the LastError property value in order to see the error code meaning

enumErrorCodes.ERR_NOERROR (0)

The method call was successful.