Copyright © 2006-2018 MultiMedia Soft

SetRecordingRange method

Previous pageReturn to chapter overviewNext page



Sets a recording range that automatically stops a file recording session when a given position is reached.





[Visual Basic]

control.SetRecordingRange (

nStartPosition as Long,

nEndPosition as Long

) as enumErrorCodes



short control.SetRecordingRange (

long nStartPosition,

long nEndPosition









Start position expressed in milliseconds. This parameter is used only when the recording session has been started through the StartFromClipboard, StartFromFile, StartFromFileRaw, StartFromMemory and StartFromMemoryRaw methods while is ignored when the recording sessions has been started through other recording methods like StartFromDirectSoundDevice, StartFromURL and so on.


End position expressed in milliseconds. Set this parameter to -1 for recording till the end of a sound file or till the moment in which the recording session will be manually stopped through a call to the Stop method.




Return value






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.