Copyright © 2006-2019 MultiMedia Soft

InitDriversType method

Previous pageReturn to chapter overviewNext page

Remarks

 

Initializes the type of drivers (DirectSound and/or ASIO) for input devices managed by the control. This method can be called only once and will affect any other instance of the control inside the application. Next calls to this method will be ignored until the multimedia engine has been reset through the ResetEngine method: in this specific case the InitDriversType method must be called after the ResetEngine method but before the ResetControl method.

 

The call to this method must be performed before calling any other method that will use a recording related functionality, possibly in the container form initialization function: calling this method inside the constructor function of the container form will not work and could cause unpredictable results.

 

IMPORTANT NOTE: When using the Audio Sound Recorder API component in conjunction with our Audio DJ Studio API component, which also contains the InitDriversType method, it should be preferred calling the InitDriversType method from Audio DJ Studio API so it will automatically affect both input and output devices.

 

If only DirectSound output devices are needed, a call to this method can be omitted; if ASIO output devices are needed, this method should be called before any other method of the control because it will affect output devices enumeration performed through GetInputDevicesCount and GetInputDeviceDesc methods.

 

For further information about ASIO drivers management, refer to the How to manage ASIO drivers tutorial.

 

 

Syntax

 

[Visual Basic]

Public Function InitDriversType (

nDriverType as enumDriverTypes

) as enumErrorCodes


 

[C#]

public enumErrorCodes InitDriversType (

enumDriverTypes nDriverType

);


 

[C++]

public: enumErrorCodes InitDriversType (

enumDriverTypes nDriverType

);


 

 

Parameter

Description

 

 

nDriverType

Type of drivers managed by the control.

Supported values are the following:

Mnemonic constant

Value

Meaning

DRIVER_TYPE_DIRECT_SOUND (default)

0

Only DirectSound output devices are supported and ASIO output devices will be ignored.

DRIVER_TYPE_ASIO

1

Only ASIO output devices are supported and DirectSound output devices will be ignored.

DRIVER_TYPE_BOTH_DS_FIRST

2

Both DirectSound and ASIO output devices are supported, DirectSound output devices will be listed first when enumerating output devices through GetInputDevicesCount and GetInputDeviceDesc methods.

DRIVER_TYPE_BOTH_ASIO_FIRST

3

Both DirectSound and ASIO output devices are supported, ASIO output devices will be listed first when enumerating output devices through GetInputDevicesCount and GetInputDeviceDesc methods.

DRIVER_TYPE_WASAPI

4

Only WASAPI devices are supported: this setting can be only applied under Windows Vista and later versions.

 

 

 

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