I'm writing a program that requires the information about the song name, author(s) and the current elapsed time of the song. Song name and authors I can get with Windows' API (WinRT, more specifically winrt.windows.media.control, but I cannot find any way to retrieve the information about the current elapsed time. The songs are being played from streaming services' apss, such as Spotify for Desktop, Apple Music app, etc. The program's task is to play a pre-defined animation, synchronized with the song, that's why I need to have the elapsed time of the song. I've tried "simulating" the elapsed time by detecting if the song has changed, and then resetting the timer. That has a major flaw, where if a song stops the timer still goes (because the API still shows the song as playing), so I'm unable to see whether the song is paused or not. Recently I've also tried to make a little library that records audio samples from the microphone and sends them to Shazam. That works better, but it seems that the data of the elapsed time I get from it isn't that reliable. Continue reading...