Huge CPU peak + hang on crossfade. [Archive] - Quintessential Forum

PDA

View Full Version : Huge CPU peak + hang on crossfade.


markdentoffe
08-31-2007, 05:37 PM
I started having this problem at about the same time as I started using Rex's Vista skin. I'm not at all sure it's related though. "I vill investigate" (Anyone know Herr Flick of the Gestapo? ;))
Actually I'm quite sure it's not, because a skin will very unlikely have any influence on the xfade.


Some time during the crossfade overlap, suddenly the fade is completely buggered up. This includes the the new track, which is by then dominant, abrubtly stopping, then the old one will play a few moments (a second or so) and then the new one will take over again. This happens together with a near 100% CPU peak (even when it's at 0-5% before and after the crossfade). Well actually it's a %50 peak: core1 100% and core2 near 0%.
This doesn't happen all the time and not always that severe. Sometimes it just hangs half a second and then goes on normally.

I've enlarged the crossfade buffer, but still happened again afterwards.
It was 10s, 15% pre, I set it to 15s, 50% pre.

I'm not sure this is a bug, but I'll still post it. Making the crossfade multi-threaded might help I suppose, but that's definitely not going to be easy and/worth the effort.
I do think the fact that it's not constant indicates it being some sort of bug rather than xfade inefficiency.
Even when I skip 5 tracks in a row or start playing a random track in the PQ it doesn't have these peaks. They are completely random and more frequent when I don't pay attention to them.

I've included a task manager cpu usage screenshot.
"A" means peak on xfade, "B" means xfade without (huge) peak.

Brkovic Slobodan
09-01-2007, 06:41 PM
I have the same problem. I'm using Development Release 119 on Athlon 64 3000+, 1.5 GB RAM and here is screenshot of CPU performance when only active program is QCD:

http://img411.imageshack.us/img411/2268/qcdmu1.gif

markdentoffe
09-01-2007, 08:09 PM
Yeah, but that's just because amd is rubbish. :cheeky:

Paul
09-01-2007, 08:16 PM
So, I do expect CPU spikes during the actual crossfade since audio buffers are being mixed. If your soundcard doesn't do this in hardware, DirectSound will do it in software which may be taxing depending on how crappy your card's drivers are. In most cases the CPU spike should be minimal and not affect playback.

But the permanent CPU topping that Brkovic displayed above is not due to crossfading. Are you running the ASIO plugin by chance? I got 100% CPU using that plugin as well. If so, try switching to an alternate playback plugin and check CPU usage.

markdentoffe
09-02-2007, 08:29 AM
Although I do have onboard sound instead of a dedicated soundcard, I will not have you calling anything about my pc crappy! It was well expensive enough.:cheeky:
I use the onboard azalia (high definition, eh!;)) on my P5B.
Latest Vista 64 drivers.

Besides, it only started happening a while ago, and I think it was even after I lengthened the xfading times.
I'll shorten them again and see if the problem's solved.

Tokelil
09-02-2007, 10:39 AM
Latest Vista 64 drivers.Vista 64bit drivers are hardly know for their high performance at this point in time. (Generally speaking) Also on Vista the mixing of channels is done on the CPU.

Brkovic Slobodan
09-02-2007, 07:36 PM
Yeah, but that's just because amd is rubbish. :cheeky:
Thanks for such a perfect solution, genius... :ermm:

Brkovic Slobodan
09-02-2007, 07:39 PM
Are you running the ASIO plugin by chance?
No, I'm not using ASIO plugin.

Tokelil
09-02-2007, 09:24 PM
No, I'm not using ASIO plugin.I assume you aren't running any 3rd party plug-ins? Does it happen with all the different output plug-ins?

(You write you use QCD, but I assume are running QMP build 119, right?)

Brkovic Slobodan
09-03-2007, 01:15 PM
I assume you aren't running any 3rd party plug-ins? Does it happen with all the different output plug-ins?

(You write you use QCD, but I assume are running QMP build 119, right?)
You're right in both - I'm not using any 3rd party plug-in (only thing I aditional installed is skin QCD 4.51 - http://beta.quinnware.com/skins.php?skin=313) and I'm running QMP build 119. Weird thing is that CPU performance is on 100% even if player is just runing in stopped mode (no song is playing).

Tokelil
09-03-2007, 02:00 PM
You're right in both - I'm not using any 3rd party plug-in (only thing I aditional installed is skin QCD 4.51 - http://beta.quinnware.com/skins.php?skin=313) and I'm running QMP build 119. Weird thing is that CPU performance is on 100% even if player is just runing in stopped mode (no song is playing).Do you have MusicID running? (Go to Preferences -> Settings -> Gracenote -> MusicID File) If it isn't done with analysing all your files, it will use 100% CPU time. (Though running in a low priority thread, so it shouldn't affect performance much)

Brkovic Slobodan
09-03-2007, 08:18 PM
Do you have MusicID running? (Go to Preferences -> Settings -> Gracenote -> MusicID File) If it isn't done with analysing all your files, it will use 100% CPU time. (Though running in a low priority thread, so it shouldn't affect performance much)
Yes, that was the problem. Thank you!

Rex_Mundi_Incarnit
09-03-2007, 11:33 PM
qmp needs to tell the user that this can happen because this is not the first time we get this issue raised.

traveller
09-22-2007, 07:12 AM
I have been experiencing the same CPU overload that Markdentoffe reported. On my old P2 based Win2k system, it got so bad that several times I had to shut off the computer to regain control. I was using the crossfade only for gapless playback with default settings both on the crossfader and QMP's buffer. Media Library isn't even installed, so that's not an issue. I tried switching to the basic DirectSound output, but it crashes (divide by zero error; Dr Watson log attached). At least the simple DS doesn't hijack the CPU.Tunes are a mix of ogg and mp3; no pattern as to what causes the hang up. One thing I noticed: the hangups occurred when one track was ending and another was starting. When the player finally began working again, it skipped the track that should have played and went to the next one in the queue. This happened more than once before the hangups degenerated to the point that I couldn't wait all day to get my computer back (they seemed to get progressively worse). Looking forward to b120.

traveller
09-23-2007, 10:26 PM
I finally caught one of the crashes while using the simple directsound output. Guess what? It was preceded by the same CPU overload that we have been seeing with the crossfade. I don't pretend to be a programmer (wanted to be one many years ago) but this suggests that the issue is rooted in the QMP buffer and is not related to the output plugin used. I will try the waveout plugin just to test this theory.