Remarks
Initializes the type of drivers (DirectSound and/or ASIO) for output 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.
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 GetOutputDevicesCount and GetOutputDeviceDesc methods.
For further information about ASIO drivers management, refer to the How to manage ASIO drivers tutorial.
Syntax
[C++]
short control.InitDriversType (
short 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 GetOutputDevicesCount and GetOutputDeviceDesc methods.
If a certain sound card supports both DirectSound and ASIO drivers, it will be seen as two separate sound cards; it's in any case important to know that being able to manage both DirectSound and ASIO drivers at the same time is not guaranteed to be supported by all sound cards.
IMPORTANT NOTES:
| • | when using this setting for playback of video clips in conjunction with a DirectSound sound card, you could hear the audio stream having a noticeable delay respect to the video stream: this can be usually reduced/eliminated by lowering the value of the BufferLength property around 150 milliseconds. |
| • | when using this setting for playback of sound files, on DirectSound output devices you may note a certain slowness of commands like PauseSound or SeekSound: this can be reduced by lowering the value of the BufferLength property around 100-150 milliseconds. |
|
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 GetOutputDevicesCount and GetOutputDeviceDesc methods.
If a certain sound card supports both DirectSound and ASIO drivers, it will be seen as two separate sound cards; it's in any case important to know that being able to manage both DirectSound and ASIO drivers at the same time is not guaranteed to be supported by all sound cards.
IMPORTANT NOTES:
| • | when using this setting for playback of video clips in conjunction with a DirectSound sound card, you could hear the audio stream having a noticeable delay respect to the video stream: this can be usually reduced/eliminated by lowering the value of the BufferLength property around 150 milliseconds. |
| • | when using this setting for playback of sound files, on DirectSound output devices you may note a certain slowness of commands like PauseSound or SeekSound: this can be reduced by lowering the value of the BufferLength property around 100-150 milliseconds. |
|
|
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
|
|