Open settings panel for ASIO driver
Open ASIO Settings Panel for Specified Device
Create an audio I/O object,
asiosettings with the device associated with
audioPlayerRecorder as the argument.
playRec = audioPlayerRecorder; asiosettings(playRec.Device)
Open ASIO Settings Panel for Default Device
asiosettings function with no arguments.
To optimize latency when using an ASIO driver, set the buffer size of the ASIO driver to the buffer size of your audio I/O object. In this example, assume the input to your audio device writer is 64 samples per frame. This example requires a Windows machine and an ASIO driver.
audioDeviceWriter System object™. Open the ASIO settings panel for an ASIO-compatible device associated with your device writer.
deviceWriter = audioDeviceWriter('Driver','ASIO'); asiosettings(deviceWriter.Device)
On the machine in this example, the following dialog opens:
The dialog that opens is specific to your ASIO driver. Set the ASIO buffer size to the desired size, 64.
The latency is now minimized for the frame size of 64 samples. If you want to measure the reduction in latency specific to your system, follow the steps in the Measure Audio Latency example.
deviceName — Name of ASIO-compatible device
default ASIO-compatible device (default) | character vector | string
Name of ASIO-compatible device, specified as a character vector or string.
deviceName is not specified, the default
ASIO-compatible device is used.
To view a list of valid ASIO device names on your machine, use
getAudioDevices on an
asiosettingsis compatible only on Windows machines with ASIO drivers. ASIO drivers do not come pre-installed with Windows.
asiosettingsreturns an error if called with a locked audio device. For example:
aDR = audioDeviceReader('Driver','ASIO'); aDR(); asiosettings(aDR.Device)
Error using audio_asiosettings PortAudio Error: Device unavailable Error in asiosettings (line 77) audio_asiosettings(ID);