GetMusic()

Discuss any general programming issues here
Post Reply
djrikki
Posts: 682
Joined: Wed Apr 06, 2011 12:26 am

GetMusic()

Post by djrikki »

Hi,

There is SeekMusic(), but how do I return the current position (in milliseconds) of the currently playing music?

Puzzled :s
Evolve - Rapid GUI Development tool for MUI Royale and RapaGUI
http://myevolve.wordpress.com
User avatar
Allanon
Posts: 742
Joined: Sun Feb 14, 2010 7:53 pm
Location: Italy
Contact:

Re: GetMusic()

Post by Allanon »

Hello,
you could start a timer when you start the music playback
----------------------------
[Allanon] Fabio Falcucci | GitHub (leaving) | Gitea (my new house) | My Patreon page | All my links
PEB
Posts: 588
Joined: Sun Feb 21, 2010 1:28 am

Re: GetMusic()

Post by PEB »

Does GetAttribute(#MUSIC) with #ATTRPOSITION not work for what you want?
djrikki
Posts: 682
Joined: Wed Apr 06, 2011 12:26 am

Re: GetMusic()

Post 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. :D
Evolve - Rapid GUI Development tool for MUI Royale and RapaGUI
http://myevolve.wordpress.com
djrikki
Posts: 682
Joined: Wed Apr 06, 2011 12:26 am

Re: GetMusic()

Post 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.
Evolve - Rapid GUI Development tool for MUI Royale and RapaGUI
http://myevolve.wordpress.com
User avatar
airsoftsoftwair
Posts: 5887
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: GetMusic()

Post by airsoftsoftwair »

Check out the HollyAmp source code. It does everything you want.
Post Reply