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]

Public Function SetRecordingRange (

nStartPosition as Int32,

nEndPosition as Int32

) as enumErrorCodes



public enumErrorCodes SetRecordingRange (

Int32 nStartPosition,

Int32 nEndPosition




public: enumErrorCodes SetRecordingRange (

Int32 nStartPosition,

Int32 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 last error.

enumErrorCodes.ERR_NOERROR (0)

The method call was successful.