In addition to my previous post in this thread ( http://www.hydrogenaudio.org/forums/index....st&p=823130 ) when foobar wasn't colligated with only one core and it could use all six cores of my CPU, then average CPU usage by foobar2000 process was around 66% with maximum of 74%. Wave seekbar is configured to concurrently process 4 tracks (same is prevoius test, when foobar utilized only single core). CPU was quite hot before I speeded up my cooler (61*C)... Just for develeoper information

Zao - could you add another "display downmix" option? Currently we have "downmix display to mono" - could we have "downmix display to stereo (2ch)" additionally? It will be nice option for those, who often listen to multichannel tracks on headphones, and thus use "downmix multichannel to stereo" DSP plugin.

Thanks Zao I got one question... How procedure of downmix is prepared in your plugin? Why I am asking: stereo display of 6ch/24bit/48kHz FLAC files ripped from DVD-A tracks look on downmixed display like they were clipped during nearly whole track... Like 0 dBFS was reached at one point and held during 30 sec. for example. Foobar's Peak Meter shows the same thing. Peaks reach up to +6 dB... But audio doesn't sound like it was clipped at any point of time... Does it mean that both visualisation routines doesn't work properly or is there something that I miss about 5.1 downmixing or 24 bit FLAC decoding?

The coefficients used to mix-down can be found in the source code for that functionality.They are scientifically taken from thin air, and might not quite match the "typical" downmix of many-channel content.What it does is mix all the channels into left channel based on the coefficients, and similarly all the channels into the right channel. If mono is requested, the resulting stereo image is simply averaged.

What you have to realize is that you're asking for some sort of approximation of the original signal, and if you want to preserve energy in the mixdown, there's more energy in six channels than two. Feel free to contribute "better" mixdown matrices.The following are the matrices for mixing from {mono, stereo, 4ch, 5ch, 5.1ch, 7.1ch} to stereo. The mono transformation is the same, but averaged at the end.

Last Edit: 22 March, 2013, 05:32:41 PM by Zao

Zao shang yong zao nong zao rang zao ren zao.To, early in the morning, use a chisel to build a bathtub makes impatient people hot-tempered.

I think above matrices are about right. A gain of 0.7 (root(1/2)=~0.7) is common. My only concern is the 1 for LFE in both left and right downmixed channels. You're effectively doubling the low frequency channel, since normally this only gets fed to one sub-woofer. I'd suggest completely ditching this channel all-together as normal stereo speakers/headphones can hardly produce sub-bass anyway. At the very least attenuate it by 3dB, cutting perceived volume in half to compensate for the fact you're using the LFE channel twice.

Hmmm... Yes, coeffs are generally OK and conform with old ITU-R-BS775-1 for 6 ch (except LFE coeff - as noted by Propheticus). But something like "volume normalisation" should be used to avoid "clipping" on displayed waveform that isn't present in the reproduced sound. I mean that values of displayed waveform should be calculated as (raw values calculated from coefficients) divided by (maximal value calculated in whole file).

i was just listening to a song and i noticed the waveform was blank. previous and next tracks in the playlist were ok so i went back to the track with the blank seekbar and it still wouldn't show.

i went to close foobar for a restart, but it just hung. i checked with process explorer and found it eating all the CPU.

not sure if you can do anything because i've killed the process now but i thought i'd mention it. there's nothing special about the track. it's just FLAC encoded from a normal CD. using latest component/foobar2000 1.2.4beta3/windows 7 x64.

There's min(cores,3) processing threads (by default) that act on tracks in a largely queue-like manner.Files are added to it if:

there's a missing waveform for a track that's just starting,

if there's a missing waveform for the next track (by guess at the playback order and playlist)

if the user invokes the Extract Waveform command.

The processing threads loop around (efficiently), picking tracks from the front(ish) of the queue, and once it has picked one, decodes and processes it from start to end.They honor an abort callback raised at shutdown time whenever actively decoding, so your screenshot indicates that there's two threads that are stuck scanning some file(s), and these are most probably not the file that you're observing is missing a waveform, that's just a victim of a queue that never drains.There's only one place in the analysis code where it could wedge like this, and it's one that I had to touch in the last speed optimization. Blargh.

Zao shang yong zao nong zao rang zao ren zao.To, early in the morning, use a chisel to build a bathtub makes impatient people hot-tempered.

My waveform seekbar was working fine up until today, when I tried to change the colours. Now, when "Mix-down to mono" is selected the seekbar is just the blank background colour; with no waveform, current time bar or highlight. Changing to "Mix-down to stereo" or "Keep as-is" everything displays fine, but I want the mono display. I tried updating to the latest version (0.2.30) and it hasn't helped. I tried changing the colours back to what they were, no colour combination is working. Any ideas?

I waited up to 10 minutes to see if CPU load would subside, but it did not!

CPU is continuing to hover at 25% even as I post this. This component has had plenty of time to scan and should not be using up 25% CPU indefinitely!

P.S. -- This waveform seekbar visualization lives in its own tab in my foobar2000, and the tab was not even active/showing when all the above was happening!

*EDIT*

30 minutes playback time has passed and 25% CPU usage continues . . . . so I decided to click the "Stop" button, and track stopped playing . . . . I then tried exiting fb2k by pressing the top right [X] button . . . . all foobar2000 exit functionality was immediately frozen and unusable!, in fact foobar2000 froze TOTALLY!, in fact other open windows are now being frozen and my desktop graphics are going to the dogs! . . . I am dragging an open notepad window around the desktop and it is leaving ghost images everywhere . . . I killed explorer.exe but it made no difference to the corrupted open windows . . . . BAD BAD CRASH! . . . I have one final quick look at foobar2000.exe process in Process Hacker before I "terminate" it . . .and CPU usage is frozen solid at 25% !!!!

Analysis is a background task, and takes the opportunity to analyse files it doesn't know about when it finds out about them.If you're afraid of it stealing your precious cycles, it runs with idle priority so the scheduler will never preempt something else to perform it.

The problem here isn't that it's scanning, that's a natural state of existence. The problem is that the scan is slightly broken and never terminates for some tracks.

Zao shang yong zao nong zao rang zao ren zao.To, early in the morning, use a chisel to build a bathtub makes impatient people hot-tempered.

I'm also having a problem with CPU load since updating to 0.2.30. With certain audio files no seekbar is displayed and at least one CPU core spikes to 100%, stays there and never finishes. The Foobar process then has to be stopped by force.

For me this has only occurred with FLAC files so far and not with mp3 or ogg (at least so far). Also, not all FLAC files show this problem, only certain ones. The screenshot shows the properties of one such file. Most other files of the same album do not have this problem, however, only some.

I have also tried deleting the waveform database file but that didn't seem to help. Any way we can help finding the problem?

Thank you, Zao, I've tried one problematic file with 0.2.30.1. I still get an eternal scan and 100% core usage with the file but I've noticed one difference: when the CPU spikes, foobar can now be closed normally without killing the process.

unfortunately it's still very broken. it's rarely displaying waveforms for anything now and the CPU is being munched as before. the only difference is that i can close foobar normally. same as gundelgauk above really.

edit: i note the problem seems to start with very quiet tracks. if i start foobar with a problematic file as the only entry in the playlist. there is no CPU usage. i then start playback and the CPU usage jumps to max but there is no mention of any attempt to scan the file in the console. if i restart foobar and start playing a louder track, it behaves as normal and shows what it is doing in the console.

marc2003, that seems to be an interesting discovery about quiet files, since my current test file is also rather quiet. However it gets a bit louder at the end (orchestra kicks in). Also, the track just before my problem file is even more quiet and does not show this problem. The waveform for it was generated very quickly with 0.2.30.1 and no noticeable CPU spike. So I'm not entirely convinced if the problem is only caused by quiet files, no offense meant.

Screenshot 1 is the waveform of the problem file.

Screenshot 2 is the waveform of the track before it on the same CD, which scans normally.