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 class 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] Public Function StartOnWasapiDevice ( nDeviceIndex as Integer, nDeviceType as enumWasapiDeviceTypes, ByRef nUniqueId as Long ) as enumErrorCodes |
[C#] public enumErrorCodes StartOnPlayer ( int nPlayerIndex, bool bWaitCompletion, ref int nUniqueId ); |
[C++] public: enumErrorCodes StartOnWasapiDevice ( short nDeviceIndex, short nDeviceType, int __gc *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 |