I tried the example project in the repository, I am using Windows 10 Pro 21H2 build 19044.2006.
OnAnySessionOpened event is raised only when you launch the program, any new media source can not be detected while the program is running.
- When you close media source (spotify or chrome for example) the
OnAnySessionClosed event is not raised and instead the OnAnyPlaybackStateChanged event is being called multiple times:

If you try to reopen the closed media source, it is not detected neither.
I tried the example project in the repository, I am using Windows 10 Pro 21H2 build 19044.2006.
OnAnySessionOpenedevent is raised only when you launch the program, any new media source can not be detected while the program is running.OnAnySessionClosedevent is not raised and instead theOnAnyPlaybackStateChangedevent is being called multiple times:If you try to reopen the closed media source, it is not detected neither.