Copyright © 2005-2011 MultiMedia Soft

SeekSound method

Previous pageReturn to chapter overviewNext page

Remarks

 

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

 

Positioning is always referred to the original sound duration, meaning that it won't keep count of eventual tempo and/or playback rate changes and will always move playback to the position on the song as it should be played at its original speed.

 

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.

 

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

 

 

Syntax

 

[Visual Basic]

Public Function SeekSound (

nPlayerIndex as Int16,

nOffset as UInt32

) as enumErrorCodes


 

[C#]

public enumErrorCodes SeekSound (

Int16 nPlayerIndex,

UInt32 nOffset

);


 

[C++]

public: enumErrorCodes SeekSound (

Int16 nPlayerIndex,

UInt32 nOffset

);


 

 

Parameter

Description

 

 

nPlayerIndex

Number representing the zero-based index of the involved player

nOffset

Number representing the position to reach; it's value depends upon the value of the ScaleUnits property

 

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.