Copyright © 2001-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 SoundRecognizer object section.

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

 

 

Syntax

 

[Visual Basic]

control.SoundRecognizer.StartOnFile (

strPathname as String,

bWaitCompletion as enumBoolean,

nUniqueId as Long

) as enumErrorCodes


 

[C++]

short control.SoundRecognizer.StartOnFile (

LPCTSTR strPathname,

short bWaitCompletion,

long *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

BOOL_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

BOOL_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 BOOL_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, check the LastError property value in order to get the error code

enumErrorCodes.ERR_NOERROR (0)

The method call was successful