Timing/sync problems (pops, clicks, stutters) with multiple sound cards

Bug #667651 reported by Sean M. Pappalardo on 2010-10-28
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Sean M. Pappalardo
Sean M. Pappalardo

Bug Description

Using 1.8 branch r2661 on Debian squeeze, AMD64 kernel, Athlon64 2200MHz CPU, 1.25GB RAM and on-board nVidia nForce3 sound card (shows as Realtek in Windows,) running at 48kHz sample rate.

If I choose a second sound card (like the IEC958 version of the nVidia one) for the headphone bus and increase the latency to max (170ms,) there's a quarter-second stutter/skip in the following cadence: 2 seconds, 14 seconds, 2 seconds, 14 seconds, etc. This happens whether or not I have anything going to the headphone bus, and in both Vinyl Emulation and PITS modes and even if I unload my wireless firmware/driver (b43.) (CPUFreq and PowerNowD are present on the system but not running.)

If I hook up an additional USB sound card (Behringer UCA-202,) these skips cause the cards to be out of sync and they never quite recover because another skip happens before they can.

The skip cadence seems to be particular to each card, as the UCA-202 skips about every 16 seconds while the nVidia one skips as specified above while they're both playing.

(These skips sound like xruns at lower latencies (10~21ms.))

Related branches

description: updated
description: updated

At 44.1kHz and 170ms latency, the nVidia card skips at about 2~3s, 15s, etc. and the UCA-202 skips at about 17~18s
At 44.1kHz and 46ms latency, the nVidia card skips at about 0~1s, 3~4s, etc. and the UCA-202 at about 4~5s.

So it's definitely latency- and sample rate-dependent as well.

summary: - Timing/sync problems with two sound cards
+ Timing/sync problems (pops, clicks, stutters) with two sound cards
summary: - Timing/sync problems (pops, clicks, stutters) with two sound cards
+ Timing/sync problems (pops, clicks, stutters) with multiple sound cards
tags: added: glitch

Changed the requestBufferMutex to a lock() instead of tryLock() in soundmanager.cpp (line 497) and it improves the situation:
at 48kHz, 170ms, both cards stutter at about 30s, which Albert suggests may now be the sound API trying to help.

Changed in mixxx:
assignee: nobody → Sean M. Pappalardo (pegasus-renegadetech)
status: New → Confirmed
status: Confirmed → In Progress
fninja (seanmbudd) wrote :

I found that Debian(squeeze,sid)uses an out of date version of portaudio,that doesnt support realtime thread priority,and probably other things.I installed the portaudio version from the ubuntu maverick repos,and realtime threads work now.Hope it helps.

Changed in mixxx:
milestone: none → 1.9.0

Progress is being made in the fixes_soundcardSync branch. As of r2549, Mixxx locks to the master output sound card so at least there aren't pops going out to the main floor. Still working on fixing it for all cards...

Can't fix for all cards without a timer-powered engine. Branch has been cleaned up to just sync to the master output or direct deck output card as of r2552.

Changed in mixxx:
milestone: 1.9.0 → none
Changed in mixxx:
status: In Progress → Fix Committed
Mark Booth (markybooth) wrote :

I'm having a similar problem of getting audio glitches with multiple sound cards. It happens even if I'm not setting anything to play through the headphones. This my set-up
Windows Vista 32-bit
AMD Turion 64 X2 TL-58
In built Realtek sound card
USB Sound Blaster Play

It seems to work fine in version 1.6.1.

Albert Santoni (gamegod) wrote :

Hey Mark,

When you have a chance, would you mind giving this newer build a shot?

It's got some fixes related to soundcard synchronization that might improve the situation for you. Please let me know if it changes anything.


Mark Booth (markybooth) wrote :

Thanks Albert, that seems to have done the trick. I still get some skipping but that does seem to be at times when other programs are making heavy use of resources and so is presumably not a sound card problem.


SiKo (koffemans) wrote :

I tested this build on my freshly installed lenovo x201 with win 7 x64 sp1 in high performance power mode.
I use a Echo Indigo IOx and the built in Conexant sound cards, via asio4all. The echo for master, conexant for headphones.

I get the sync issue almost inmediate, or at least within 10 minutes and the output gets scrambled (like it is digitally desctructed, which it probably is).

This is a major showstopper for using Mixx at the moment.

Is there something I could do on my side (config/settings) or should I wait for the next drop?

Bill Good (bkgood) wrote :

There's been a fix committed to the 1.9 development code, it'll be in either 1.9.1 or 1.10 (although I don't have dates for either of those, and 1.9.1 may be skipped entirely).

Long story short, you'll still hear the occasional pop/click in the PFL signal. The "fix" is to prioritize PA outputs (master out, deck outs) in sound processing to make sure they're always getting the correct data when they need it, this does mean that if you (or anyone else) is using deck outputs, the outputs _must_ be on the same sound card to enable this fix. This whole quagmire is likely why most (all?) other DJ software makers don't support multiple sound cards, it's an inherently buggy idea because they all run their own, naturally disagreeing clocks.

The problem you're having with distortion is another bug, I'm guessing https://bugs.launchpad.net/mixxx/+bug/732977 as you mentioned asio.

LENHOF Jean-Yves (jean-yves) wrote :


I'm also affected by this one. Is there a linux version with the fix I can test ? If not, do I have to extract trunk or whatever tag version to have that fix in to see if it is better ?


Jean-Yves: You can either wait for 1.9.1, 1.10-beta1, or build any of the current branches (1.9, 1.10, trunk,) since they all have the fix.

RJ Skerry-Ryan (rryan) on 2011-10-05
tags: added: multi-soundcard
RJ Skerry-Ryan (rryan) on 2011-11-07
Changed in mixxx:
status: Fix Committed → Fix Released
RJ Skerry-Ryan (rryan) wrote :

Someone just mentioned this issue again and I think that maybe we should re-open it since we didn't fix the real issue. We just added a fix that would make the popping/sync errors only audible in the headphone channel. Bug #726894 is also related to this.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers