Copyright © 2005-2023 MultiMedia Soft

SoundRecognizer.StartOnFile method

Previous pageReturn to chapter overviewNext page

Remarks

 

Starts recognition of a sound or video file stored on the local PC.

 

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 StartOnFile (

strPathname as String,

bWaitCompletion as Boolean,

ByRef nUniqueId as Int32

) as enumErrorCodes


 

[C#]

public enumErrorCodes StartOnFile (

string strPathname,

bool bWaitCompletion,

ref int nUniqueId

);


 

[C++]

public: enumErrorCodes StartOnFile (

string strPathname,

bool bWaitCompletion,

int __gc *nUniqueId

);


 

 

Parameter

Description

 

 

strPathname

String containing the absolute pathname of the file to recognize.

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 SoundRecognizerDone event will be raised

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.