I am writing a Spotify app in C#.
I am currently verifying that the sp_session_process_events() call is working properly. Trying to be very scientific about it, I've been using the out parameter nextTimeout to try and prevent the need for the lib to call NotifyMainThreadCallback.
The call seem to be as frequent with that feature as without it. The value of nextTimeout does not seem to be that valid everytime either. Below is a short example when I am only calling sp_session_process_events when required bĂ˝ NotifyMainThreadCallback.
00:00:08.299: - NotifyMainThreadCallback
00:00:08.312: sp_session_process_events() next process requested in 1000 ms
00:00:08.376: - NotifyMainThreadCallback
00:00:08.381: - NotifyMainThreadCallback
00:00:08.389: sp_session_process_events() next process requested in 922 ms
00:00:08.396: - UserinfoUpdatedCallback
00:00:08.401: - NotifyMainThreadCallback
00:00:08.409: sp_session_process_events() next process requested in 15 ms
00:00:08.415: - MetadataUpdatedCallback
00:00:08.419: sp_session_process_events() next process requested in 891 ms
So why use the nextTimeout at all? As far as I can see it can be ignored.