Copyright © 2005-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]

Public Function RequestSoundExportToWav (

nPlayerIndex as Int16,

strPathname as string,

nStartPosInMs as Int32,

nFinalPosInMs as Int32

) as enumErrorCodes


 

[C#]

public enumErrorCodes RequestSoundExportToWav (

Int16 nPlayerIndex,

string strPathname,

Int32 nStartPosInMs,

Int32 nFinalPosInMs

);


 

[C++]

public: enumErrorCodes RequestSoundExportToWav (

Int16 nPlayerIndex,

string strPathname,

Int32 nStartPosInMs,

Int32 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

 

 

Negative value

An error occurred (see the LastError property for further error details)

enumErrorCodes.NOERROR (0

The method call was successful.