Copyright © 2001-2019 MultiMedia Soft

RequestSoundExportToWav method

Previous pageReturn to chapter overviewNext page

Remarks

 

Requests the exporting of the sound loaded inside the given player into a file in WAV format: the destination WAV file can be stored in memory or on disk.

 

During the export phase, the container application is notified about the exporting advancement through the following events: ExportToWavStart, ExportToWavPerc and ExportToWavStop.

 

If the ExportToWavStop event reports a success, the container application can load the exported WAV file from disk or, if the destination file has been stored in memory, can copy the full WAV buffer through the CopyExportedWavToMemory method.

 

For further details about exporting a sound to a file in WAV format take a look to the How to export the loaded song into a WAV file section.

 

 

Syntax

 

[Visual Basic]

control.RequestSoundExportToWav (

nPlayer as Integer,

strPathname as String,

nStartPosInMs as Long,

nFinalPosInMs as Long

) as enumErrorCodes


 

[C++]

short control.RequestSoundExportToWav (

short nPlayer,

LPCTSTR strPathname,

long nStartPosInMs,

long nFinalPosInMs

);


 

 

Parameter

Description

 

 

nPlayerIndex

Number representing the zero-based index of the involved player

strPathname

Absolute pathname of the destination file in WAV format: if empty, the destination WAV file will be stored in memory. In this last case the memory buffer contents can be retrieved through the CopyExportedWavToMemory method

nStartPosInMs

Number representing the initial position, expressed in milliseconds, where the export of the loaded sound will begin. This value must be set to 0 in order to export from the sound beginning.

nFinalPosInMs

Number representing the final position, expressed in milliseconds, where the export of the loaded sound will end. This value must be set to -1 in order to export till the sound end.

The difference between nFinalPosInMs and nStartPosInMs must be at least 500 milliseconds: smaller ranges will be automatically adjusted accordingly.

 

 

 

Return value

 

Value

Meaning

 

 

enumErrorCodes.NOERROR (0)

The method call was successful.

Negative value

An error occurred: see the LastError property for further error details or for a list of the possible error values.