TrackBarGadget - WinAmp Style

Linux specific forum
User avatar
Inner
PureBasic Expert
PureBasic Expert
Posts: 714
Joined: Fri Apr 25, 2003 4:47 pm
Location: New Zealand

TrackBarGadget - WinAmp Style

Post by Inner »

I've been looking at changing this in my player for awhile but have not found a solution to it, as eventtype() doesn't reply with (as documented and tested) any type of event when the TrackBarGadget is clicked on, how do you modify a moving TrackBarGadget that is progressing though the song position?

The idea was before I got shut out by eventtype(), was to detect the left click, pause the song, and wait until the left mouse button was released and resume playing at the new position.

I can't pause the music on a trackbarevent() because it is constantly getting polled by setgadgetstate() events from the song playing, which would result in the song being played to be paused forever.

Any ideas?
walker
Enthusiast
Enthusiast
Posts: 634
Joined: Wed May 05, 2004 4:04 pm
Location: Germany

Post by walker »

why pausing the song at all? I see no reason (maybe i overlook something?) to pause a song if the trackbar is moved by a user....
Simply read the new position and play from this point on... :D
User avatar
Inner
PureBasic Expert
PureBasic Expert
Posts: 714
Joined: Fri Apr 25, 2003 4:47 pm
Location: New Zealand

Post by Inner »

walker wrote:why pausing the song at all? I see no reason (maybe i overlook something?) to pause a song if the trackbar is moved by a user....
Simply read the new position and play from this point on... :D
Because while the song is playing the bar is constantly moving it needs to be paused when you click on it, so that it has freedom to move and not be reset to the current song position.

This is where we are.
(----------<> )

Try to move the bar
(----------------<> )

Because the song is playing
(----------<> )

---

However that said there was a recent bug in the linux version of trackbargadget having a message over flow problem, which has been fixed.

So maybe better results will follow when we have an update.
Post Reply