SoundRecognizer.StartOnWasapiDevice method |
|
Remarks
Starts recognition of a sound stream incoming from a WASAPI capture or loopback device.
[This method applies to Windows Vista and later versions only]
For further details about the use of the sound recognizer see the SoundRecognizer object section.
Further information about WASAPI can be found inside the How to manage audio flow through WASAPI tutorial.
For details about sound recognition refer to the How to recognize music and obtain related information tutorial.
Syntax
[Visual Basic] control.SoundRecognizer.StartOnWasapiDevice ( nDeviceIndex as Integer, nDeviceType as enumWasapiDeviceTypes, nUniqueId as Long ) as enumErrorCodes |
[C++] short control.SoundRecognizer.StartOnWasapiDevice ( short nDeviceIndex, short nDeviceType, long *nUniqueId ); |
Parameter |
Description |
|||||||||
|
|
|||||||||
nDeviceIndex |
Number representing the zero-based index of the WASAPI device of interest. The total number of available WASAPI devices can be obtained using the WASAPI.DeviceGetCount method. |
|||||||||
nDeviceType |
The type of device. Supported values are the following:
|
|||||||||
nUniqueId |
Reference that, on return from the method call, will contain the unique identifier of the recognition session: obtained results are not available until the SoundRecognizerDone event is raised. |
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 |