Scratch Live Articles

Troubleshoot USB dropouts / audio glitches (Windows)

Am I getting USB dropouts?

If you're getting audio glitches, clicks or dropouts, then there is a high chance you may be experiencing a USB dropout.

A USB dropout may be shown by the USB dropout indicator lighting in Scratch Live, ITCH, or Serato DJ Intro however this may not always happen.


What is a USB dropout?

Scratch Live, ITCH and Serato DJ Intro create what's known as an isochronous stream of audio data over the USB bus. That is, it is 'fed' at precise intervals from our USB buffer. If for some reason what is in the buffer can not be fed onto the bus, the USB dropout indicator may light, and more often than not, you will hear an audible click or glitch in the audio. This is a USB dropout.

What causes USB dropouts?

As explained above, maintaining an isochronous stream requires 'stuff' to happen at a certain time, with a 1ms USB buffer size the program only needs to send about 350 Bytes of data each ms over USB, but this needs to happen every millisecond, otherwise you'll (obviously) experience a dropout.

The work is done by the CPU and the USB controller, which are under the control of a few co-operative things; the operating system, the BIOS, and drivers, ultimately at the request of the audio application. If one of these isn't behaving correctly, or can't perform it's work in time, you can guess the result.

The first thing is to check if the CPU is busy doing something else, or is not up to the task of feeding the buffer and feeding the buffer to the USB.

Open up the task manager - Task Manager (Ctrl+Alt+-Del)

and click on the processes tab, check what your overall CPU usage is like and percentage the application is using.

If your overall usage is close to 100% and you're getting dropouts, try raising the size of your USB buffer. Giving your CPU more time to do the work of streaming the audio over USB.

If your overall usage is not near 100%, and especially if it's nothing like being close to capacity, you should use the following techniques to check what is happening inside the Windows kernel and causing dropouts.

 

USB interupts and how to eliminate dropouts

An interrupt in this context is basically when the Windows kernel halts execution of applications while some work needs to be performed by a driver - wikipedia

An interrupt is an asynchronous signal from hardware indicating the need for attention or a synchronous event in software indicating the need for a change in execution. A hardware interrupt causes the processor to save its state of execution via a context switch, and begin execution of an interrupt handler.

Problems for audio applications can arise when the hardware drivers don't hand back control in short enough a time to allow for us to maintain the USB stream. From an audio application perspective, it has just lost some time suddenly, as during interrupts the processors state is saved and restored, as if nothing has happened. Hence the need to trace interrupts using a 3rd party tool which can look inside the kernel.

It is worth while making sure your computer is optimized for digital audio. To do so follow this link: www.serato.com

 

If optimizing your computer doesn't help then you should do the following:

 


Windows Performance Toolkit (for Windows 7 and Windows Vista)

Xperf is a Windows Performance Toolkit that can collect data on a computer's DPC times for users experiencing USB dropouts.

We have created a useful DPC Trace reporting tool from this toolkit that enables users to easily install the needed components and run a tracing session that logs DPC latency and saves a report that can be used to diagnose your issue.


Using DPC Trace reporting tool for Windows 7 and Vista

  1. Close all programs
  2. Download "DPCISRtracing.zip" from here: www.serato.com
  3. Unzip this file on your desktop
  4. Run the "setup.bat" file to install the correct version of the Windows Performance Toolkit for your system. Choose the "Complete" install option and follow all prompts until installation is complete
  5. Connect your hardware and play a track in Scratch Live or ITCH
  6. Right click the "RunDpcIsrTrace.bat" file and select "Run as Administrator"
  7. Wait until this process is complete, then double click the "Home Folder - Shortcut" to go to your home folder. The output file with your DPC/ISR debug info should be saved here with the following filename: "%COMPUTERNAME%-dpcisr-report.txt"
  8. Attach this file to your help thread if one exists or:
  9. Open a new help discussion for your USB dropouts, posting as much system information as you can and then attach the file to this thread. To open a new help thread go here: www.serato.com (click)

We will advise on what to do with the dropouts on your system.


The RATT Trace Processing tool (for Windows XP)

RATT (Richard and Aaron's Tracing Tool) is a tool for logging the time taken for interrupts within Windows XP.

 

Using RATT

Download RATT from here--> Ratt Tool

Run the installer then do the following:

  1. From the RATT system tray icon menu, turn off "Loop Mode"
  2. Choose "Stop Monitoring"
  3. Open the directrory "C:\WINDOWS\system32\LogFiles\RATTV3" (assuming that you've got Windows installed to C:\WINDOWS)
  4. Delete the files in that directory (if they won't delete, make sure you've stopped monitoring, and that loop mode is off)
  5. Choose "Start Monitoring" from the RATT system tray icon menu
  6. Connect your hardware and play a track in Scratch Live or ITCH for a few minutes
  7. Choose "Stop Monitoring" from the RATT system tray icon menu
  8. Attach the file ".cswa-accumulator-report.txt" from "C:\WINDOWS\system32\LogFiles\RATTV3" ... to your help thread if one exists or:
  9. Open a new help discussion for your USB dropouts, posting as much system information as you can and then attach the file to this thread. To open a new help thread go here: www.serato.com (click)


We will advise on what to do with the dropouts on your system.

Did you find this useful? Yes No
More Scratch Live Articles | Print this Article