Page 1 of 1
GetMusic()
Posted: Mon Jun 11, 2012 8:32 pm
by djrikki
Hi,
There is
SeekMusic(), but how do I return the current position (in milliseconds) of the currently playing music?
Puzzled :s
Re: GetMusic()
Posted: Mon Jun 11, 2012 8:39 pm
by Allanon
Hello,
you could start a timer when you start the music playback
Re: GetMusic()
Posted: Mon Jun 11, 2012 11:16 pm
by PEB
Does GetAttribute(#MUSIC) with #ATTRPOSITION not work for what you want?
Re: GetMusic()
Posted: Mon Jun 11, 2012 11:19 pm
by djrikki
@allanon
Timers are no good for what I need it for. I need to give the end-user the opportunity to skip forward and back through a track as well as update the display every second to show its current play position in the track.
@peb
Hmmm, I'll have a look tomorrow when I get back in the office. I've used
GetAttribute() on many different occasions, it didn't occur to me to take a look it on this occasion.
Assuming you have taken that direct from the documentation that does sound very promising. I'll give it a go. Thank you.

Re: GetMusic()
Posted: Mon Jun 11, 2012 11:27 pm
by djrikki
Being able to get the current position in the music being playing is very essential to what I am trying to do. Also I need to detect when a track has ended so that the next track (if there is one) in the playlist follows immediately afterwards.
Re: GetMusic()
Posted: Tue Jun 12, 2012 12:06 am
by airsoftsoftwair
Check out the HollyAmp source code. It does everything you want.