Copyright © 2001-2023 MultiMedia Soft

SeekSound method

Previous pageReturn to chapter overviewNext page

Remarks

 

Moves the given player to the specified position over the current song.

 

A call to this method is ignored if the embedded fader, through a call to the Fader.Init method, has been set to work with a single playlist (FADE_SINGLE_PLAYLIST).

 

If the status of the given player is "stopped" or "paused", a call to this method will move the playback position but will not cause the playback to start while, if the status of the given player is "playing", a call to this method will move the playback position and will continue playback without interruptions. In case the player should be "stopped", a call to this method will move the playback position and will automatically put the player in "paused" state.

 

In case the given player should have been loaded with a video clip, the call to this method would have the same effect of the VideoPlayer.Seek method.

 

If the seek operation brings the playback position beyond the end of the file, the SoundDone event is generated.

 

 

Syntax

 

[Visual Basic]

control.SeekSound (

nPlayer as Integer,

nOffset as Long

) as enumErrorCodes


 

[C++]

short control.SeekSound (

short nPlayer,

long nOffset

);


 

 

Parameter

Description

 

 

nPlayer

Number representing the zero-based index of the involved player

nOffset

Number representing the position to reach; its value depends upon the value of the ScaleUnits property. When the ScaleUnits property is expressed in percentage, from 0 to 100, the position doesn't keep count of eventual tempo and/or playback rate changes. In other cases the passed position must keep count of eventual tempo and/or playback rate changes so it must be a value between 0 and the sound duration returned by the SoundDurationGet method having its bKeepCountOfRateChange parameter set to "BOOL_TRUE".

 

 

Return value

 

Value

Meaning

 

 

Negative value

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

enumErrorCodes.ERR_NOERROR (0)

The call was successful.