Sound artifacts on broadcasting

Bug #1530994 reported by Fedor
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mixxx
Fix Released
Medium
Daniel Schürmann

Bug Description

Hi,

I'm using Mixxx for internet broadcasting, and recently (from september-november) found that Mixxx (daily trusty builds) does some "knoking" and "echo/reverb" effects during broadcasting.
I hoped this problem is only some bugs of daily builds, but it appeared in 2.0.0.
I've downgrade to 1.1 version and everything worked fine! My hope was, that this issue fixed in 2.0.0 but this problem appears there.

I'm using linux mate 14.04 on vmWare
Yes, I know, maybe problems in hardware because Mixxx running on virtual machine, or Icecast.
BUT version 1.1 works fine! And builds before September (maybe November - do not remember exactly) also worked fine for broadcasting.

Currently my case - find August 2015 builds or Downgrade to 1.1 Version.

So here my broadcasting web site http://airbradio.kiev.ua/
and nearest week I'll be running Mixxx 2.0.0. Can you please try to listen sound artefacts, especially between songs, when song sound goes down. It's possible hear some knoking and artefacts.

Mixxx is great and super! Thank you for doing it!!!

Tags: shoutcast
Revision history for this message
Fedor (fedor-ly) wrote :

Can you please provide a link with daily builds? Thus I'll try to find exactly Mixxx build with this issue.

Revision history for this message
Daniel Schürmann (daschuer) wrote :

http://downloads.mixxx.org/builds/1.12/release/

Mixxx 1.11 has the issue, that in case of buffer-underflows, it consumes the network buffer until it is empty and the stream breaks.
This is because the engine skips one callback. The sound card internally plays other silence or repeats the old buffer.
Since the a callback is skipped, no samples are passed to the broadcasting buffer and the stream is feed by the buffer needed to compensate network load issues.

We have fixed it in 1.12 by duplicating samples to catch up the stream compared to a wallclock. This should sound more like a slow down than an echo/reverb or knocking. But maybe there is something else wrong.

Which hardware preferences settings do you use (API and device)? Maybe the virtual machines soundcard clock is that jittery that the wallclock sample duplicate/drop algorithm kicks in on every callback.

Is your underflow counter in the hardware preferences counting?
Is there anything suspicious in you ~/.mixxx/mixxx.log during broadcasting?
Is the headphone / master sound effected as well?

Is is possible to record the distorted sound?

Revision history for this message
Fedor (fedor-ly) wrote :

Everything was fine in 1.12 for me. No sound artefacts from web broadcasting.

"Is your underflow counter in the hardware preferences counting?"
Cant find it.

"Is the headphone / master sound effected as well?"
Only from broadcasting, I've turned on sound on virtual machine, it sounds good. But if I'm listening from Web, sound distorted.

"Is is possible to record the distorted sound?"
Here some data and samples recorded in winamp via Streamriper:
 http://airbradio.kiev.ua/pydio/data/public/investigatingmixxx

Revision history for this message
Fedor (fedor-ly) wrote :

Daniel, where I can find August/September 2015 builds? Because in directory http://downloads.mixxx.org/builds/1.12/release/ oldest build, only from 25 of November 2015.
Or I should build it myself from git?

Revision history for this message
Sean M. Pappalardo (pegasus-renegadetech) wrote :

If you build from the 1.12 branch form Git, you can use the 'git bisect' command to help you find the change that causes the problem.

tags: added: broadcasting
summary: - Sound artefacts on broadcasting
+ Sound artifacts on broadcasting
Revision history for this message
Sean M. Pappalardo (pegasus-renegadetech) wrote :

You can also check the debug builds which include some older ones: http://downloads.mixxx.org/builds/1.12/debug/

Revision history for this message
Sébastien BLAISOT (sblaisot) wrote :

older builds are in the old subdiretory
http://downloads.mixxx.org/builds/1.12/release/old/

Revision history for this message
Daniel Schürmann (daschuer) wrote :

> "Is your underflow counter in the hardware preferences counting?"
> Cant find it.

It is: Menu -> Preferences -> Sound Hardware -> (Scroll to the very button) -> Buffer Underflow Count

----

Thank you for the log file:

These lines are suspicious:

Debug [Engine]: EngineNetworkStream::writeSilence() buffer full
Debug [Engine]: EngineNetworkStream::write() buffer full, loosing samples
Debug [Engine]: EngineNetworkStream::write() buffer full, loosing samples
...
Debug [Engine]: EngineNetworkStream::writeSilence() buffer full
Debug [Engine]: EngineNetworkStream::write() buffer full, loosing samples

from here:

https://github.com/mixxxdj/mixxx/blob/1.12/src/engine/sidechain/enginenetworkstream.cpp#L138
https://github.com/mixxxdj/mixxx/blob/1.12/src/engine/sidechain/enginenetworkstream.cpp#L109

writeSilence() is called when the engine stream driven by the soundcard clock has fallen far behind the network clock (likely due to buffer underflows in the Mixxx engine)
In your case, the network stream was also not processed because the network buffer is full as well.

So it looks like we are facing a system overload situation. Here some ideas:
* disable waveforms
* disable EQs
* disable not required track analysis or analyse all tracks before the sreaming starts.
* assign two CPUs to your VM
* be sure the latest guest extensions are installed

Currently Mixxx has the highest priority an a smooth master output, which is the wrong strategy for your setup.
I am currently working on a solution that the Mixxx engine is driven by the network clock. This may shift the distortions to the master output and is hopefully finally able to handle longer overload situations.

Changed in mixxx:
status: New → Confirmed
importance: Undecided → Medium
assignee: nobody → Daniel Schürmann (daschuer)
milestone: none → 2.1.0
tags: added: shoutcast
removed: broadcasting
Revision history for this message
Fedor (fedor-ly) wrote :

Sorry for my late answer, I'm still looking for this bug in builds.
I thinks my hardware is good, 4Gb + 4 processors for this VM. Based on Ubuntu-Mate 14.04.
I've tested several builds, bug located somewhere between:
mixxx-1.12.0-beta1-1.12-git5596-release-trusty-amd64.deb 30-Oct-2015 15:36 35M Debian/Ubuntu Package bug present, has sound issues
and
mixxx-1.12.0-beta1-1.12-git5573-release-trusty-amd64.deb 15-Oct-2015 17:02 35M Debian/Ubuntu Package works good

And one more, can you please say, how I can disable waveform analysis data generation, because it using 3Gb of disk space.

Thank you.

Changed in mixxx:
assignee: Daniel Schürmann (daschuer) → nobody
Revision history for this message
Daniel Schürmann (daschuer) wrote :

This is probably the PR which introduces your issues:
https://github.com/mixxxdj/mixxx/pull/665

Revision history for this message
Daniel Schürmann (daschuer) wrote :

the network clock PR is here, waiting for a review:
https://github.com/mixxxdj/mixxx/pull/894

Be (be.ing)
Changed in mixxx:
status: Confirmed → In Progress
Be (be.ing)
Changed in mixxx:
assignee: nobody → Daniel Schürmann (daschuer)
Be (be.ing)
Changed in mixxx:
status: In Progress → Fix Committed
Revision history for this message
Fedor (fedor-ly) wrote :

Can you please help how to compile git5582 on 16.04?
This is last version, without sound artifacts.

Thanks!

Revision history for this message
Daniel Schürmann (daschuer) wrote :

Does this help?
https://www.mixxx.org/wiki/doku.php/compiling_on_linux

Why git5582?
More recent deb files can be found here: http://downloads.mixxx.org/builds/2.1/release/

Revision history for this message
Fedor (fedor-ly) wrote :

I'm using 6469 build, and it some times it crashes with big play lists i suupose, while 5582 worked in weeks!

But after 5582 there also apperared a little sound muting, when songs are switching to next.
In 5582 it was very smoothly between songs. You can check it, just waiting any next song at http://airbradio.kiev.ua/

So how can it fix? I i'm using ALSA Sample Rate 48000, 85.3 ms buffer, maybe something with other options?

Revision history for this message
Daniel Schürmann (daschuer) wrote :

What means "Crashes"? Is there something suspicious in the mixxx.log just before the crash?

We have fixed a lag GUI cause by the track analysis. Are all tracks analysed?

Revision history for this message
Daniel Schürmann (daschuer) wrote :

Which is the fist version after 5582 that has the sound muting?

Changed in mixxx:
status: Fix Committed → Fix Released
Revision history for this message
Fedor (fedor-ly) wrote :
Revision history for this message
Fedor (fedor-ly) wrote :

Under sound muting, I mean, sound dissapear approx on 0.1 second only, and songs are switch to next.
Please see log in attachments, upper.

Revision history for this message
Swiftb0y (swiftb0y) wrote :

Mixxx now uses GitHub for bug tracking. This bug has been migrated to:
https://github.com/mixxxdj/mixxx/issues/8421

lock status: Metadata changes locked and limited to project staff
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.