Copyright © 2005-2023 MultiMedia Soft

SoundRecognizer.StartOnPlayer method

Previous pageReturn to chapter overviewNext page

Remarks

 

Starts recognition of the sound or video file loaded inside the given player.

 

For further details about the use of the sound recognizer see the SoundRecognizerMan class.

For details about sound recognition refer to the How to recognize music and obtain related information tutorial.

 

 

Syntax

 

[Visual Basic]

Public Function StartOnPlayer (

nPlayerIndex as Int32,

bWaitCompletion as Boolean,

ByRef nUniqueId as Int32

) as enumErrorCodes


 

[C#]

public enumErrorCodes StartOnPlayer (

int nPlayerIndex,

bool bWaitCompletion,

ref int nUniqueId

);


 

[C++]

public: enumErrorCodes StartOnPlayer (

int nPlayerIndex,

bool bWaitCompletion,

int __gc *nUniqueId

);


 

 

Parameter

Description

 

 

nPlayerIndex

Number representing the zero-based index of the player that will use the video player.

bWaitCompletion

Boolean value indicating if the recognizer should wait for completion before returning to the caller.

Supported values are the following:

Value

Meaning

false

The recognizer will not wait for completion before returning to the caller and results will be available when the CallbackForSoundRecognizerEvents delegate will be invoked with the nEvent parameter set to EV_SOUND_RECOGNITION_DONE

true

The recognizer will wait for completion before returning to the caller and results will be immediately available

nUniqueId

Reference that, on return from the method call, will contain the unique identifier of the recognition session: in case the bWaitCompletion parameter should be set to "true", this unique identifier could be immediately used in order to invoke further methods that will give access to obtained results:

 

- SoundRecognizer.ResultsCountGet to obtain the total number of music results

- SoundRecognizer.ResultInfoGet to obtain a specific information related to the given music result

- SoundRecognizer.ResultGenresCountGet to obtain the number of genres related to the given music result

- SoundRecognizer.ResultGenreGet to obtain a specific genre related to the given music result

- SoundRecognizer.ResultArtistsCountGet to obtain the number of artists related to the given music result

- SoundRecognizer.ResultArtistInfoGet to obtain the information about the given artist

- SoundRecognizer.ResultArtistRolesCountGet to obtain the number of roles related to the given artist

- SoundRecognizer.ResultArtistRoleInfoGet to obtain information about the given role

- SoundRecognizer.ResultsDelete to clear the given recognition session from memory

 

 

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.