|
How to manage ASIO drivers |
![]() ![]()
|
ASIO (Audio Stream Input/Output) is a sound card driver protocol for digital audio specified by Steinberg, providing a low-latency and high fidelity interface between a software application and a computer's sound card. ASIO bypasses the normal audio path from the user application through layers of intermediary Windows operating system software, so that the application connects directly to the hardware of the sound card. Each layer that is bypassed means a reduction in latency, the delay between an application sending sound to the sound being reproduced by the sound card.
By default Active Sound Recorder enumerates input devices (sound cards) supporting the DirectSound protocol: in order to let Active Sound Recorder enumerating devices supporting ASIO drivers, you need to make a call to the InitDriversType method and to specify which kind of drivers/protocols your application will support and, in case you should need supporting both ASIO and DirectSound at the same time, in which order; if a certain sound card should support both DirectSound and ASIO drivers, it would be enumerated as two different sound cards, one supporting DirectSound and one supporting ASIO.
IMPORTANT NOTE: When using the Active Sound Recorder control in conjunction with our Active DJ Studio control, which also contains the InitDriversType method, it should be preferred calling the same InitDriversType method available inside Active DJ Studio so it will automatically affect both input and output devices.
The call to the InitDriversType method is mandatory before performing calls to the InitRecordingSystem, GetInputDevicesCount and GetInputDeviceDesc methods: if the InitDriversType method should be called at a later time, it would report back an error; if for any reason you should need calling it at a later time, you would need performing the following sequence of calls: 1. ResetEngine method 2. InitDriversType method 3. Eventual new enumeration of input devices through the GetInputDevicesCount and GetInputDeviceDesc methods. 4. ResetControl method
After having initialized the type of driver(s) in use through the InitDriversType method, it will be possible enumerating available input devices through the GetInputDevicesCount and GetInputDeviceDesc methods: depending upon the driver set, these methods will return the overall list of available input devices (DirectSound + ASIO) so it will be possible setting them inside the nDeviceIndex parameter of the StartFromAsioDevice method. You can also obtain the driver in use by a specific input device through the GetInputDeviceDriverType method.
If the InitDriversType method should be set to initialize the use of ASIO devices, you could access specific ASIO features through methods exposed by the ASIO property which implements the ASIO COM object:
The call to the ASIO.DeviceStart method is mandatory in order to be able starting a recording session on a specific ASIO device. You can know if a specific ASIO device is already started through the ASIO.DeviceIsStarted method.
IMPORTANT NOTE: When using Active Sound Recorder in conjunction with Active DJ Studio, you should prefer calling this method using the same ASIO.DeviceStart method available inside Active DJ Studio so you would have a better control over the playback mode.
After starting an ASIO device, it will be possible performing the following tasks:
When dealing with sound cards having multiple input channels, like the M-Audio 1010LT, there is the possibility to mix the input of all of the channels into one single recording session or, by using multiple instances of Active Sound Recorder, you can record at the same time each channel on a separate destination file: for this purpose check the StartFromAsioDevice method.
Samples of usage of ASIO drivers in C# and VB.NET can be found inside the following samples installed with the product's setup package: - AsioList - AsioSimpleRecorder
|