Topic: Crackling and weird behaviour only when using external USB-DAC

Hello everyone,

I've made a similar post in the past, but have isolated the issue now:

Pianoteq 8 runs absolutely fine on all three of my systems running Windows 10 when I use the integrated audio, or the soundcard. Two are laptops, one is a desktop PC. I use 48k/48k, maximum polyphony and a buffer size of 64 for 1.3 ms delay with ASIO4ALL drivers. No crackling, no sound drops. CPU usage is rarely more than 20% of any single core.

As soon as I use an external DAC instead of the integrated audio - either a Topping DX1 or an Apple USB-to-3.5 mm adapter - I get sound drops and crackling. What's even weirder is that all buffer sizes behave as expected, but as soon as I select any combination of sample rate and buffer size giving me less than exactly 2.0 ms of delay, I get a very big delay of about half a second. All of this only happens with USB-DACs, on all systems. The USB devices work fine in any other scenario, so they're not the problem either.

I've tried disabling the integrated audio chip/soundcard in each system, but it didn't help. I also disallowed the system to put USB devices to sleep to save power.

What very slightly alleviates the delay issue is when I select "Force WDM Driver to 16 Bit" in the ASIO4ALL settings. Maybe that helps further isolate the issue. It doesn't help with the crackling though.

What really confuses me is that it's a fairly specific yet consistent issue across multiple systems and multiple DACs.

Does anyone have an idea what the reason for this is, and how to address it?

Thanks a lot!

Last edited by Cifer (08-12-2022 15:35)

Re: Crackling and weird behaviour only when using external USB-DAC

Just an idea. As far as I know USB-DACs in the "HiFi" sector often have large input buffers. For realtime-audio small hardware buffers are required, audio gear for musicians.

Re: Crackling and weird behaviour only when using external USB-DAC

Cifer wrote:

Hello everyone,

I've made a similar post in the past, but have isolated the issue now:

Pianoteq 8 runs absolutely fine on all three of my systems running Windows 10 when I use the integrated audio, or the soundcard. Two are laptops, one is a desktop PC. I use 48k/48k, maximum polyphony and a buffer size of 64 for 1.3 ms delay with ASIO4ALL drivers. No crackling, no sound drops. CPU usage is rarely more than 20% of any single core.

As soon as I use an external DAC instead of the integrated audio - either a Topping DX1 or an Apple USB-to-3.5 mm adapter - I get sound drops and crackling. What's even weirder is that all buffer sizes behave as expected, but as soon as I select any combination of sample rate and buffer size giving me less than exactly 2.0 ms of delay, I get a very big delay of about half a second. All of this only happens with USB-DACs, on all systems. The USB devices work fine in any other scenario, so they're not the problem either.

I've tried disabling the integrated audio chip/soundcard in each system, but it didn't help. I also disallowed the system to put USB devices to sleep to save power.

What really confuses me is that it's a fairly specific yet consistent issue across multiple systems and multiple DACs.

Does anyone have an idea what the reason for this is, and how to address it?

Thanks a lot!

I had exactly  the same issue  with a focurite/firewire on a Mac book pro. Pianoteq 8 would run perfectly using internal mac internal sound card and I would get occasional crackles if I used the focusrite audio.  I spent hours playing will all perf parameters to end up isolating the issue. This is counter intuitive as in theory, using an external audio interface is supposed to reduce the main computer CPU load.

Last edited by joannchr (07-12-2022 23:27)

Re: Crackling and weird behaviour only when using external USB-DAC

Thanks for the replies.

groovy wrote:

Just an idea. As far as I know USB-DACs in the "HiFi" sector often have large input buffers. For realtime-audio small hardware buffers are required, audio gear for musicians.

That is correct, but I don't think it would explain my specific issues. Why would a large input buffer suddenly add 500 ms of delay as soon as I drop below 2.0 ms of delay in Pianoteq? I don't see how it would cause crackling either. In addition, it happens with several different external DACs and the behaviour is always EXACTLY the same.

joannchr wrote:

I had exactly  the same issue  with a focurite/firewire on a Mac book pro. Pianoteq 8 would run perfectly using internal mac internal sound card and I would get occasional crackles if I used the focusrite audio.  I spent hours playing will all perf parameters to end up isolating the issue. This is counter intuitive as in theory, using an external audio interface is supposed to reduce the main computer CPU load.

I'm not sure if that's a comparable issue since I'm not using an interface but a simple DAC, and my main issue is the sudden delay when dropping below 2.0 ms. The crackling is an issue as well, but it has nothing to do with CPU load in my case. Perf settings are mostly irrelevant, and my CPU never goes above 30% usage on any single core.

Last edited by Cifer (08-12-2022 05:50)

Re: Crackling and weird behaviour only when using external USB-DAC

Have you tried to turn off wifi - connection. That helps with my very old laptop.

Re: Crackling and weird behaviour only when using external USB-DAC

I confirm that Wifi can be a problem, but I guess all these hifi converters don't care about latency in favor of pristine audio performance. I have no such problems with several interfaces from Tascam and Motu

Re: Crackling and weird behaviour only when using external USB-DAC

2 ms at 48000 Hz samplingrate are 96 samples.

(0.002 s * 48000/s = 96)

You wrote less than 2 ms does not work on your USB-Bus and USB-DACs and this means 64 samples.

Not all Audio-Hardwares and buffer chains can handle small chunks of 64 samples in realtime correctly. I remember I had one home entertainment usb-soundcard in the past that only accepted 128 samples minimum for example.

Last edited by groovy (08-12-2022 12:03)

Re: Crackling and weird behaviour only when using external USB-DAC

groovy wrote:

2 ms at 48000 Hz samplingrate are 96 samples.

(0.002 s * 48000/s = 96)

You wrote less than 2 ms does not work on your USB-Bus and USB-DACs and this means 64 samples.

Not all Audio-Hardwares and buffer chains can handle small chunks of 64 samples in realtime correctly. I remember I had one home entertainment usb-soundcard in the past that only accepted 128 samples minimum for example.

It's not about the buffer size, it's about the delay. If I select a buffer size of 192000 Hz and a buffer rate of 256 samples, giving me 1.3 ms of delay, it happens as well. And if I select a sample rate of 11025 Hz and a buffer size of 64 samples, giving me 5.8 seconds of delay, it works just fine. So it's not just small chunks of 64 samples, it's small chunks at any sample rate. This is what I don't understand.

I also don't understand why every external DAC gives me crackling sound at any sample rate and buffer size. This isn't an isolated problem with one DAC and one computer as the behaviour is exactly the same across three different systems and with multiple DACs.

I've realized that selecting "Force WDM Driver to 16 Bit" in the Asio4all settings helps a tiny bit with the delay issue. (added it in the original post too.) Maybe that's a clue as to what the issue is.

Last edited by Cifer (08-12-2022 15:37)

Re: Crackling and weird behaviour only when using external USB-DAC

What you call "delay" is just the time Pianoteq has to compute one buffer size of samples.

In your example at 192000 Hz Pianoteq has computed 256 audiosamples in 1.3 ms.
At 11025 Hz Pianoteq has much more time to compute 64 audiosamples in 5.8 ms or 256 in 23.2 ms.

23.2 ms /  1.3 ms = 17.8

Pianoteq has 18x more time to compute "the piano sound" in your second example.

But this is just the source of your buffer chain. There are several more buffers to pass on the way to your speaker.

output buffer of pianoteq
input buffer of your audiodriver
output buffer of your audiodriver
input buffer USB
output buffer USB
input buffer DAC
output buffer DAC

The sum is the real delay from sound computing to acoustic sound.

The less time the chain has to transport your source buffer, the more likely underruns (crack!) and interrupts (windows!) can happen.

Last edited by groovy (08-12-2022 16:38)

Re: Crackling and weird behaviour only when using external USB-DAC

groovy wrote:

What you call "delay" is just the time Pianoteq has to compute one buffer size of samples.

In your example at 192000 Hz Pianoteq has computed 256 audiosamples in 1.3 ms.
At 11025 Hz Pianoteq has much more time to compute 64 audiosamples in 5.8 ms or 256 in 23.2 ms.

23.2 ms /  1.3 ms = 17.8

Pianoteq has 18x more time to compute "the piano sound" in your second example.

But this is just the source of your buffer chain. There are several more buffers to pass on the way to your speaker.

output buffer of pianoteq
input buffer of your audiodriver
output buffer of your audiodriver
input buffer USB
output buffer USB
input buffer DAC
output buffer DAC

The sum is the real delay from sound computing to acoustic sound.

The less time the chain has to transport your source buffer, the more likely underruns (crack!) and interrupts (windows!) can happen.

Thank you.

I've tried increasing the Input Buffer Offset in the ASIO4ALL settings to 20 ms, and the delay when having less than 2.0 ms of latency is much lower. Your explanation might have been correct. However, the crackling isn't any better, and it's there no matter which sample rate and buffer size I select.

If it is indeed an input buffer issue, is there a simple way to fix it with another external device while still using the headphone amp/DAC? I don't want to record anything, and I would like to keep the sound of the Topping since I've heard that most cheap audio interfaces have poor headphone amp performance. I am not sure if I could simply plug an interface into the PC and then plug the external Topping DAC/amp into the interface, or if the Topping would then reintroduce the problem. If that would be the case, could I somehow bypass the DAC of the Topping so that the system uses the DAC of the interface with no buffer issues, but the amp in the Topping?

Last edited by Cifer (08-12-2022 21:27)

Re: Crackling and weird behaviour only when using external USB-DAC

If you're just using built in sound theb most $100+ interfaces will significantly improve your experience. Ditch the DAC, you're zooming in on something irrelevant to your situation.

Re: Crackling and weird behaviour only when using external USB-DAC

I've solved the issue. Reinstalling the Topping ASIO driver a second time made it show up in Pianoteq. A recent Windows update must have messed with things.

For some reason I thought this driver simply didn't work in Pianoteq, but it was actually faulty.

This also explains why the issue appeared across all platforms.

Thanks to everyone who tried to help!