HydrogenAudio

Hosted Forums => foobar2000 => Support - (fb2k) => Topic started by: Vicas on 2021-05-24 18:02:27

Title: 1.6.7 beta 4 - high CPU usage while playback is paused
Post by: Vicas on 2021-05-24 18:02:27
Since last beta CPU usage is a bit higher when playing but somehow when playback is paused CPU usage is way too higher (about 25%). That never happened before.

Windows 10 20H2 x64

Attached screenshot with CPU state with foobar playing/paused.

Components
Code: [Select]
Core (2021-05-24 14:28:56 UTC)
    foobar2000 core 1.6.7 beta 4
foo_albumlist.dll (2021-05-24 14:28:20 UTC)
    Album List 1.6.7 beta 4
foo_cdda.dll (2021-05-24 14:28:20 UTC)
    CD Audio Decoder 1.6.7 beta 4
foo_converter.dll (2021-05-24 14:28:24 UTC)
    Converter 1.6.7 beta 4
foo_dsp_eq.dll (2021-05-24 14:28:18 UTC)
    Equalizer 1.2.2
foo_dsp_silence.dll (2019-02-25 01:42:55 UTC)
    Affix silence 0.0.10
foo_dsp_std.dll (2021-05-24 14:28:18 UTC)
    Standard DSP Array 1.6.7 beta 4
foo_fileops.dll (2021-05-24 14:28:22 UTC)
    File Operations 1.6.7 beta 4
foo_freedb2.dll (2021-05-24 14:28:20 UTC)
    Online Tagger 0.8
foo_httpcontrol.dll (2016-01-14 18:46:54 UTC)
    HTTP Control 0.97.17
foo_input_dts.dll (2020-04-13 19:01:18 UTC)
    DTS decoder 0.6.8
foo_input_monkey.dll (2019-11-21 20:41:38 UTC)
    Monkey's Audio Decoder 2.3.1
foo_input_std.dll (2021-05-24 14:28:28 UTC)
    FFmpeg Decoders 4.3.1
    Standard Input Array 1.6.7 beta 4
foo_masstag.dll (2019-08-15 18:12:46 UTC)
    Masstagger 1.8.5
foo_musical_spectrum.dll (2018-05-22 15:10:15 UTC)
    Musical Spectrum 0.9.1
foo_plorg.dll (2019-05-09 15:40:28 UTC)
    Playlist Organizer 2.6
foo_queuecontents.dll (2018-06-25 21:54:31 UTC)
    Queue Contents Editor 0.5.1
foo_quicktag.dll (2018-03-04 16:42:03 UTC)
    Quick Tagger 1.0.3
foo_rgscan.dll (2021-05-24 14:28:24 UTC)
    ReplayGain Scanner 1.6.7 beta 4
foo_scheduler.dll (2020-01-27 00:40:56 UTC)
    Scheduler 4.19
foo_stop_after_queue.dll (2020-10-18 07:03:34 UTC)
    Stop After Queue 1.2.1
foo_textdisplay.dll (2017-12-12 19:13:55 UTC)
    Text Display UI Element 1.1 beta 1
foo_texttools.dll (2010-08-24 07:49:52 UTC)
    Text Tools 1.0.5
foo_tfsandbox.dll (2018-01-10 18:37:53 UTC)
    Title Formatting Sandbox 1.0.3
foo_ui_std.dll (2021-05-24 14:28:34 UTC)
    Default User Interface 1.6.7 beta 4
foo_unpack.dll (2021-05-24 14:28:28 UTC)
    ZIP/GZIP/RAR/7-Zip Reader 1.6.7 beta 4
foo_utils.dll (2008-02-08 21:26:58 UTC)
    Playlist Tools 0.6.2 beta 6
foo_verifier.dll (2020-07-02 11:34:34 UTC)
    File Integrity Verifier 1.4
foo_vis_vumeter.dll (2013-02-16 10:44:26 UTC)
    VU Meter 2013-02-16
foo_wave_minibar_mod.dll (2021-05-09 14:15:18 UTC)
    Waveform Minibar (mod) 1.0.45
Title: Re: 1.6.7 beta 4 - high CPU usage while playback is paused
Post by: Rollin on 2021-05-24 18:29:23
Indeed. Reproducible on  Windows 7 too with default output mode. Enabling/disabling fading doesn't affect situation. Exclusive mode doesn't cause high CPU load.
Title: Re: 1.6.7 beta 4 - high CPU usage while playback is paused
Post by: Peter on 2021-05-24 22:18:27
Noted and confirmed, thanks for reporting.
Title: Re: 1.6.7 beta 4 - high CPU usage while playback is paused
Post by: eagleray on 2021-05-25 23:37:08
High CPU on pause noted in beta 3.
Title: Re: 1.6.7 beta 4 - high CPU usage while playback is paused
Post by: Forfit on 2021-05-26 08:46:35
Confirmed 25%.
Title: Re: 1.6.7 beta 4 - high CPU usage while playback is paused
Post by: Peter on 2021-05-26 12:01:20
Fixed in beta 5
Title: Re: 1.6.7 beta 4 - high CPU usage while playback is paused
Post by: josemescud on 2021-05-26 13:27:38
Fixed in beta 5

I have installed Beta 5 on a DELL laptop with S.O. Windows 10 Pro 21H1

I don't have a sound system connected. I have the music in the internal DSD of the pc.

So far I have used Device: WASAPI (push): Speakers / Headphones (Realtek Audio) and everything sounded great.

I have changed the Device: Default: Speakers / Headphones (Realtek Audio) [exclusive] and it has been a disaster. Only noise is reproduced at maximum volume.

I do not know if there is something I am doing wrong or is that the version has debugging and adjustments left.

------------------------

I have also installed it on my Intel NUC with S.O. Windows 10 Pro 21H1

I have it connected to a Marshall Speaker by RCA cable

I changed the Device: WASAPI (push): Lautsprecher (Realtek® Audio) to Default: Lautsprecher (Realtek® Audio) [exclusive]

The sound is good, but the problem is that sporadically, when tagging from the Playlist View (properties) the sound gets stuck and farts. Reboot and everything OK.

I have the doubt of which is the Device that I have to choose:
- Default: Lautsprecher (Realtek® Audio) [exclusive]
- Lautsprecher (Realtek® Audio) [exclusive]
What is the difference between the two?

I also have it connected to a Young MKIII DAC via USB

I changed the Device: WASAPI (event): Speakers (YOUNG MKIII-BB09 Stereo) to Default: Speakers (YOUNG MKIII-BB09 Stereo) [exclusive]

The sound is also good and I have only noticed that, sporadically, when tagging from the Playlist View (properties) the sound stops for a moment while the metadata is being recorded.

Here I also have the doubt of which is the Device that I have to choose:
- Default: Speakers (YOUNG MKIII-BB09 Stereo) [exclusive]
- Speakers (YOUNG MKIII-BB09 Stereo) [exclusive]
What is the difference between the two?
Title: Re: 1.6.7 beta 4 - high CPU usage while playback is paused
Post by: josemescud on 2021-06-05 21:04:02
Fixed in beta 5

I have installed Beta 5 on a DELL laptop with S.O. Windows 10 Pro 21H1

I don't have a sound system connected. I have the music in the internal DSD of the pc.

So far I have used Device: WASAPI (push): Speakers / Headphones (Realtek Audio) and everything sounded great.

I have changed the Device: Default: Speakers / Headphones (Realtek Audio) [exclusive] and it has been a disaster. Only noise is reproduced at maximum volume.

I do not know if there is something I am doing wrong or is that the version has debugging and adjustments left.

------------------------

I have also installed it on my Intel NUC with S.O. Windows 10 Pro 21H1

I have it connected to a Marshall Speaker by RCA cable

I changed the Device: WASAPI (push): Lautsprecher (Realtek® Audio) to Default: Lautsprecher (Realtek® Audio) [exclusive]

The sound is good, but the problem is that sporadically, when tagging from the Playlist View (properties) the sound gets stuck and farts. Reboot and everything OK.

I have the doubt of which is the Device that I have to choose:
- Default: Lautsprecher (Realtek® Audio) [exclusive]
- Lautsprecher (Realtek® Audio) [exclusive]
What is the difference between the two?

I also have it connected to a Young MKIII DAC via USB

I changed the Device: WASAPI (event): Speakers (YOUNG MKIII-BB09 Stereo) to Default: Speakers (YOUNG MKIII-BB09 Stereo) [exclusive]

The sound is also good and I have only noticed that, sporadically, when tagging from the Playlist View (properties) the sound stops for a moment while the metadata is being recorded.

Here I also have the doubt of which is the Device that I have to choose:
- Default: Speakers (YOUNG MKIII-BB09 Stereo) [exclusive]
- Speakers (YOUNG MKIII-BB09 Stereo) [exclusive]
What is the difference between the two?

Title: Re: 1.6.7 beta 4 - high CPU usage while playback is paused
Post by: josemescud on 2021-06-13 11:13:42
I have installed Beta #6 and I still have the same problems I expose in message #7.
I will reinstall the Wasapi plugin until the problem is fixed.

I beg someone to reply to message #7.
Title: Re: 1.6.7 beta 4 - high CPU usage while playback is paused
Post by: Peter on 2021-06-14 11:53:56
Various exclusive mode issues are being investigated, thanks for the detailed report.
Title: Re: 1.6.7 beta 4 - high CPU usage while playback is paused
Post by: Peter on 2021-06-14 14:03:22
If you're experiencing problems with exclusive mode in 1.6.7, please try this:
https://www.foobar2000.org/temp/BeepExclusive.exe
Report what it does (plays beep cleanly, plays with glitches, fails to play).
It uses the system default device, you will have to change the system defaults to try different devices in your system.
It's build from stock Microsoft sample code; if it works properly for you, I can compare its behaviors vs fb2k to come up with a solution for the fb2k issues.
Title: Re: 1.6.7 beta 4 - high CPU usage while playback is paused
Post by: KOG on 2021-06-14 15:43:34
BeepExclusive.exe plays cleanly during short period of testing on my system even when the screen turns off where fb2k almost always stutters in both push and event mode (somewhat less in push mode).  The issues I experience in fb2k is described in the "Built-in WASAPI exclusive support - issues/bugs" thread.
Title: Re: 1.6.7 beta 4 - high CPU usage while playback is paused
Post by: porkpiehat on 2021-06-15 15:21:33
If you're experiencing problems with exclusive mode in 1.6.7, please try this:
https://www.foobar2000.org/temp/BeepExclusive.exe
Report what it does (plays beep cleanly, plays with glitches, fails to play).
It uses the system default device, you will have to change the system defaults to try different devices in your system.
It's build from stock Microsoft sample code; if it works properly for you, I can compare its behaviors vs fb2k to come up with a solution for the fb2k issues.
I have a problem in 1.6.7 Exclusive Mode (system reboot) with my USB DAC but the BeepExclusive.exe is making a clean beep.
Title: Re: 1.6.7 beta 4 - high CPU usage while playback is paused
Post by: eagleray on 2021-06-15 17:20:14
It might be a good idea to have separate settings for push and event buffers in the exclusive mode. The 100 ms default will cause Xmos devices to crash foobar if not lowered when the exclusive box is checked.  Beta 6 making music here, 18 ms buffer, exclusive event, Xmos 208 input on Topping DAC.
Title: Re: 1.6.7 beta 4 - high CPU usage while playback is paused
Post by: Peter on 2021-06-16 13:20:37
Beta 7 posted, with entirely new implementation of WASAPI Exclusive.
Title: Re: 1.6.7 beta 4 - high CPU usage while playback is paused
Post by: eagleray on 2021-06-16 18:22:45
Beta 7 posted, with entirely new implementation of WASAPI Exclusive.
Beta 7 playing music here in the exclusive mode, Topping DX3 Pro (Xmos 208 USB).
I didn't see any options in advanced preferences. Is the new code push or event?
Thank you for all the effort going into this.
Title: Re: 1.6.7 beta 4 - high CPU usage while playback is paused
Post by: Peter on 2021-06-16 20:05:28
Event mode with short buffer and super-simple lock-less data feed loop, strictly following Microsoft sample code behaviors.

Some quirks still exist (I wrote entirely new code yesterday....) but I think this is better than what we've been doing until now, hopefully I can get rid of all the options, making the defaults usable for everyone.
Title: Re: 1.6.7 beta 4 - high CPU usage while playback is paused
Post by: yindesu on 2021-06-16 20:32:53
Beta 7 posted, with entirely new implementation of WASAPI Exclusive.

I am seeing a regression compared to beta 6 just using Realtek sound from my mobo.  Whenever the player proceeds from a 24bit/48kHz file to 16bit/44.1kHz file, or vice versa, foobar2000 plays extremely choppily until I stop playback and manually open the next file.
Title: Re: 1.6.7 beta 4 - high CPU usage while playback is paused
Post by: eagleray on 2021-06-16 20:57:12
Peter, thanks for the answers. The short buffer has been what it took to get my Xmos USB interface devices to work with event previously. I'm not having the rate switch issue, but I resample everything to 96 khz so I can use the Convolver.
Title: Re: 1.6.7 beta 4 - high CPU usage while playback is paused
Post by: josemescud on 2021-06-16 21:09:35
I have installed Beta 7 and, for now, everything works excellent, both in my DAC Young MKIII and in my Marshall speaker as in my laptop.
I will report in the next few days if there are problems.
Title: Re: 1.6.7 beta 4 - high CPU usage while playback is paused
Post by: josemescud on 2021-06-17 22:40:57
I have installed Beta 8 and the exclusive mode does not work. It gives me the following error: "Unrecoverable playback error: Unsupported format"
Device: Default : Lautsprecher (Realtek® Audio) [exclusive]

I have reinstalled Beta 7
I don't think it is now mandatory to uninstall the wasapi component
Title: Re: 1.6.7 beta 4 - high CPU usage while playback is paused
Post by: fretless on 2021-06-18 00:27:35
Just installed beta 8, I'm also getting the same "Unrecoverable playback error: Unsupported format" error with all files.   Exclusive was working OK for me in beta 7, using it with a Chord Qutest DAC.   I don't have a copy of the beta 7 install anymore, so back to WASAPI shared for now.
Title: Re: 1.6.7 beta 4 - high CPU usage while playback is paused
Post by: sveakul on 2021-06-18 00:40:04
I don't have a copy of the beta 7 install anymore, so back to WASAPI shared for now.
This will get you beta 7: https://www.foobar2000.org/getfile/foobar2000_v1.6.7_beta_7.exe (https://www.foobar2000.org/getfile/foobar2000_v1.6.7_beta_7.exe)