Remarks
Exports the given sound range into a destination file using the sound encoding format defined inside the EncodeFormats.FormatToUse property.
Differently from the ExportToFile method, in this case the component attempts to export eventual tags available inside the originally loaded sound file: this feature is only available for sound files loaded from a file on disk through the LoadSound method and only for the following audio formats:
An exporting session can be stopped at any time through a call to the ExportSoundCancel method.
A successful call to this method will fire the SoundExportStarted event followed by a number of SoundExportPerc events and finally by the SoundExportDone event.
For further details see the How to export edited sounds tutorial.
Syntax
[Visual Basic]
control.ExportToFileWithTags (
nFrequency as Long,
nChannels as Long,
nBitsPerSample as Long,
nStartPosition as Long,
nEndPosition as Long,
strPathname as String
) as enumErrorCodes
|
|
[C++]
short control.ExportToFileWithTags (
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:
|
nChannels
|
Number of channels used to resample the sound to export (for example 1 for Mono, 2 for Stereo, 6 for 5.1 surround, etc.).
This parameter is ignored when:
|
nBitsPerSample
|
Reserved, must be set to 0.
|
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.
|
|