Dynamic Arm Performance in SONAR
Last updated on 3/31/2016The information in this article applies to:
- SONAR 8
- SONAR 8.5
SONAR 8 includes a new feature called Dynamic Arm. What dynamic arm basically does is pre-initializes all devices that you have enabled in SONAR's Audio Options dialog for actively reading data from the inputs even when you are not recording and are just playing your project. This occurs behind the scenes so that when you actually arm a track for recording it is done dynamically, meaning it doesn't require a gap while the device is pre-rolled. By default this feature is disabled in SONAR. It can be enabled by choosing Transport | Record Options and then placing a check in the box next to "Allow Arm Changes During Playback/Record"
There are some technical factors that should be considered when using this feature in the WDM/KS driver mode. The driver, which takes advantage of the Windows Kernel Streaming architecture, uses a mechanism where inputs and outputs are handled as discrete objects that require a queue of buffers to be submitted to the driver to process. It does this via Input Output Control's (IOCTL) to transition between user mode and kernel mode. SONAR queues up 8 record buffers in advance on each input and the audio thread keeps stoking the queue so that the driver always has buffers to fill in advance. When dealing with many input devices this overhead can add up. With 24 inputs the thread has to manage 24 queues being stoked in advance on each buffer processing cycle. All of this is done on one thread and if any one of these queues can't keep up the audio will drop out.
On the other hand, in ASIO mode there is no queuing resulting in this whole process being synchronous. ASIO works using a single ping pong callback (called bufferSwitch) to process all inputs and outputs simultaneously. With this mechanism there is no queuing required. This results in a constant load since it does not require any extra work (other than the buffer copies) to process a single input versus many inputs. This approach is why you don't see an extra overhead with dynamic arm in ASIO mode. Even though internal to an ASIO driver it has to do similar work as described above for WDM, it can be more optimal since driver vendors can implement custom IOCTLs to talk to their driver more efficiently.