Remarks
Enables/disables the splitting in chunks of a recording session whose EncodeFormats.ForRecording property is set to ENCODING_FORMAT_WAV and the EncodeFormats.WAV.EncodeMode property is set to one between WAV_ENCODE_PCM_U8, WAV_ENCODE_PCM_S16 or WAV_ENCODE_FLOAT32: this method call will be ignored when using other encoding formats and/or encoding modes.
Splitting is disabled by default. When splitting is enabled, the control will automatically save on output files (chunks) the given duration of sound data: it's important to note that the recording session will in any case continue storing sound data on the original output file.
A WavChunkSaved event is fired each time a chunk is completed and saved.
Syntax
[Visual Basic]
control.SplitWavRecordingEnable (
bEnable as enumBoolean,
nChunkDurationInMs as Long,
strChunkOutputPath as String,
strChunkFilenamePrefix as String
) as enumErrorCodes
|
|
[C++]
short control.SwitchOutputFile (
short bEnable,
long nChunkDurationInMs,
LPCTSTR strChunkOutputPath,
LPCTSTR strChunkFilenamePrefix
);
|
|
Parameter
|
Description
|
|
|
bEnable
|
Boolean flag that enables/disables the splitting procedure.
Supported values are the following:
Mnemonic constant
|
Value
|
Meaning
|
BOOL_FALSE
|
0
|
Disables splitting
|
BOOL_TRUE
|
1
|
Enables splitting
|
|
nChunkDurationInMs
|
Numeric values which defines the duration for each saved chunk expressed in milliseconds
|
strChunkOutputPath
|
String representing the absolute path where chunks will be saved, for example "C:\MyFolder\"
|
strChunkFilenamePrefix
|
String representing the prefix of the chunk filename, for example "MyChunk": each time a new chunk is saved, the filename will be modified adding the number of the chunk followed by the ".wav" extension (MyChunk1.wav, MyChunk2.wav, MyChunk3.wav, etc.)
If this parameter is left empty, the control will automatically set the filename prefix to "WavChunk".
|
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.
|
|