Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Foobar2000 1.4 Beta 6: System Media Keys Only Fire When FB Has Focus (Read 4133 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Foobar2000 1.4 Beta 6: System Media Keys Only Fire When FB Has Focus

I normally run foobar in the background and use media keys to pause, resume, next track.
With Beta 6, the media keys only operate when foobar has focus.
Only troubleshooting I did was to do a null change on the preference for this option.


Re: Foobar2000 1.4 Beta 6: System Media Keys Only Fire When FB Has Focus

Reply #1
Disregard.
I toggled the Windows 10 Universal Volume Control setting off/on and restarted foobar.
System media keys function after doing this.


Re: Foobar2000 1.4 Beta 6: System Media Keys Only Fire When FB Has Focus

Reply #2
I'm getting the exact same problem changing to beta 6. Media key doesn't work unless foobar has focus. Restarting or changing any kind of setting on volume like the other user is suggesting doesn't change anything.
I only use the play/pause button and the way foobar acts when I press the key is as if it's registering it twice. It starts, but then pauses a fraction of a second later. Same behavior when it's playing but then in reverse (pause for a tiny fraction but then keeps playing).

Re: Foobar2000 1.4 Beta 6: System Media Keys Only Fire When FB Has Focus

Reply #3
As GHammer noticed, disabling Universal Volume Control integration in Advanced Preferences restores the old behavior. If you're experiencing this issue, please toggle the setting.

There are multiple issues with Universal Volume Control being investigated right now.


Also, what User Interface are you using, is it Default or other? It might be a factor to this.
Microsoft Windows: We can't script here, this is bat country.

Re: Foobar2000 1.4 Beta 6: System Media Keys Only Fire When FB Has Focus

Reply #4
I was under the impression GHammer was talking about a windows 10 volume control setting as he mentions "Windows 10 Universal Volume Control setting" and not a foobar2000 advanced setting.
After disabling Integrate with Windows 10 Universal Volume Control it works again as before. Thanks Peter.
I'm using Columns UI.

Re: Foobar2000 1.4 Beta 6: System Media Keys Only Fire When FB Has Focus

Reply #5
Peter, changelog page lacks details about betas 5 and 6. Could you fix it, please?
• Join our efforts to make Helix MP3 encoder great again
• Opus complexity & qAAC dependence on Apple is an aberration from Vorbis & Musepack breakthroughs
• Let's pray that D. Bryant improve WavPack hybrid, C. Helmrich update FSLAC, M. van Beurden teach FLAC to handle non-audio data

Re: Foobar2000 1.4 Beta 6: System Media Keys Only Fire When FB Has Focus

Reply #6
^ small bugs that were reported here on some threads are fixed..

from official site:
2018-02-05
foobar2000 v1.4 beta 6 has been released.
Beta 4 regressions and reported bugs have been fixed.
Somewhere, there's someone dying in a foreign land
Meanwhile, the world is crying stupidity of man
Tell me why, tell me why

Re: Foobar2000 1.4 Beta 6: System Media Keys Only Fire When FB Has Focus

Reply #7
I'm getting the exact same problem changing to beta 6. Media key doesn't work unless foobar has focus. Restarting or changing any kind of setting on volume like the other user is suggesting doesn't change anything.
I only use the play/pause button and the way foobar acts when I press the key is as if it's registering it twice. It starts, but then pauses a fraction of a second later. Same behavior when it's playing but then in reverse (pause for a tiny fraction but then keeps playing).
Same issue here. Since I'm using not just the "Play" button on my keyboard, I have the following to report with "Integrate with Windows 10 UVC" turned On:
- Play/pause key double triggers itself, playback stops after a few hundred milliseconds (or resumes in case of media playing before the key press)
- Skip backwards/forwards keys work as usual.

Seems to be some sort of a race condition in the play/pause button handling routine.

As a temporary workaround, I created a new global hotkey for the Play/pause MM key in "Keyboard shortcuts" and set it to "Playback / Play or pause" action. It doesn't trigger the UVC window display anymore, but also doesn't trigger itself twice, while all other parts of UVC integration continue to work. Which is arguably a better option than a completely disabled UVC like in jazzthieve's advice.

Re: Foobar2000 1.4 Beta 6: System Media Keys Only Fire When FB Has Focus

Reply #8
Please read more carefully. It's not my advice, I was following the advice of Peter which completely solved the issue I also doubt a temporary solution like yours is a better option.

Re: Foobar2000 1.4 Beta 6: System Media Keys Only Fire When FB Has Focus

Reply #9
I also doubt a temporary solution like yours is a better option.
Care to explain why? Unless you despise the whole UVC thing, of course.

Re: Foobar2000 1.4 Beta 6: System Media Keys Only Fire When FB Has Focus

Reply #10
Sure: "temporary workaround". But if you think it's better that's your thing but don't come here wrongly attribute things to me and proclaim which solution is better. "Better" is always gonna be subjective.

Re: Foobar2000 1.4 Beta 6: System Media Keys Only Fire When FB Has Focus

Reply #11
but don't come here wrongly attribute things to me and proclaim which solution is better
For wrongly attributing things - my bad, as for "proclaiming", there's a little word called "arguably" hidden just before the "better option" bit. Which signals that indeed, it's open for debate.

Re: Foobar2000 1.4 Beta 6: System Media Keys Only Fire When FB Has Focus

Reply #12
Hence, that little word called "subjective".  8)

Re: Foobar2000 1.4 Beta 6: System Media Keys Only Fire When FB Has Focus

Reply #13
I am also experiencing this issue.

When I press it, the Windows "universal volume control" pop-up with the album art and controls pops up but the playback continues.
I can see the play/stop icon in the interface animate for a split second, going from the triangle to the two vertical bars, but the playback continues uninterrupted.
The same goes if I try to start playback from a pause or stop condition, this time the playback won't start.
Disabling the new UVC solves the issue, but I would like to use UVC if possible.

This issue happens only if foobar is minimized or if it's not the current window on top.
I am running the very old Fooglassic UI: https://extremehunter1972.deviantart.com/art/fooGlassic-1-0-8-219079776

There is also another thing, there are two sliders in Windows volume mixer panel now, is this normal?
https://imgur.com/deXgsN9

Re: Foobar2000 1.4 Beta 6: System Media Keys Only Fire When FB Has Focus

Reply #14
It looks like a bit of a mess. Columns UI has had handlers for multimedia keys dating to pre-foobar2000 1.0 when the foobar2000 core didn't support them.

Disabling that code fixes the double-triggering of the keys when Windows 10 Universal Volume Control support is enabled and foobar2000 is not activated (when using Columns UI). However, with that code disabled and when Universal Volume Control support is disabled, the keys stop working under Columns UI when foobar2000 is not activated. (Which is somewhat perplexing, as that doesn't happen with Default UI.)
.

Re: Foobar2000 1.4 Beta 6: System Media Keys Only Fire When FB Has Focus

Reply #15
Default UI also responds to WM_APPCOMMAND messages, which get sent to the active window when media keys are pressed.

Re: Foobar2000 1.4 Beta 6: System Media Keys Only Fire When FB Has Focus

Reply #16
That's useful to know, but unfortunately doesn't help much in relation to problems with foobar2000 isn't the active window.

It looks like foobar2000 detects if Columns UI is the active UI, and then doesn't call RegisterShellHookWindow() to handle multimedia keys when foobar2000 isn't the active window (due to the existing handler in Columns UI).

[edit] In fact, that's what we agreed to do at the time. I think we can fix it:

1. The core could swallow up the relevant messages in its main window procedure hook (user_interface::HookProc_t).
2. I could change Columns UI's GUID and kill the multimedia key handler when a Columns UI version requiring foobar2000 1.4 is released.
.

Re: Foobar2000 1.4 Beta 6: System Media Keys Only Fire When FB Has Focus

Reply #17
That's what we indeed did. Ancient history now.

I came across this code when adding UVC and wasn't sure what to do so I left it as-is.

I'm fixing it properly this time-
Adding user_interface_v2 with explicit methods specifying whether core should enable UVC, shell hooks, etc. Implementing it will suppress all legacy hacks; UI modules that do not implement the new interface will be treated according to old logic (presume CUI implements own shellhook, and others do not).
Microsoft Windows: We can't script here, this is bat country.

Re: Foobar2000 1.4 Beta 6: System Media Keys Only Fire When FB Has Focus

Reply #18
Implemented in beta 7 + SDK 2018-03-06. Additionally, I deactivated UVC if old CUI is detected.
Microsoft Windows: We can't script here, this is bat country.

Re: Foobar2000 1.4 Beta 6: System Media Keys Only Fire When FB Has Focus

Reply #19
Thanks. I'll probably have to handle new CUI + old foobar2000 as well for a little while (in that case, the CUI shell hook should still be active).

I guess I'll query the core's version for that (unless you have another suggestion).
.

Re: Foobar2000 1.4 Beta 6: System Media Keys Only Fire When FB Has Focus

Reply #20
I recommend detecting new version by testing if you get user_interface_v2::query_capability() calls before init().
Microsoft Windows: We can't script here, this is bat country.

Re: Foobar2000 1.4 Beta 6: System Media Keys Only Fire When FB Has Focus

Reply #21
Thanks. I suppose the last thing that's a bit unclear is what user_interface_v2::query_capability() should do if it encounters a capability it doesn't know about. The API doesn't seem to provide a way to say 'I don't know what that capability is', which leaves returning true, false or throwing an exception.
.

Re: Foobar2000 1.4 Beta 6: System Media Keys Only Fire When FB Has Focus

Reply #22
Global multimedia keys do not work for rewinding a track(Only after focus):
1 Rewind
2 Fast Forward
......................................................................
@Peter
Please make editable tags for online radio stations.
There are such names(Example):
xRADIO WATERPOL INTERNATIONALx -xxx PRETTIGE FEESTDAGEN xxx
((BRITAIN RADIO 355)) ............. Caroline, BIG L, RNI, Cruisin,
It is difficult to tie the cover to them.