Problem with SDB.Player.PlaybackTime from a VB.net program

This forum is for questions / discussions regarding development of addons / tweaks for MediaMonkey.

Moderator: Gurus

JustSomeGuy
Posts: 2
Joined: Fri Oct 24, 2014 10:49 pm

Problem with SDB.Player.PlaybackTime from a VB.net program

Post by JustSomeGuy » Fri Oct 24, 2014 11:15 pm

When i use this

Code: Select all

        SDB.Player.Next()
        While SDB.Player.isStartingPlayback
            SDB.ProcessMessages()
        End While
        SDB.Player.PlaybackTime = 30000
MediaMonkey plays a fraction of a second of the beginning of the song and then skips to 30 second into the song.
How do I avoid playing the fraction of a second at the beginning of the song?

JustSomeGuy
Posts: 2
Joined: Fri Oct 24, 2014 10:49 pm

Re: Problem with SDB.Player.PlaybackTime from a VB.net prog

Post by JustSomeGuy » Sat Oct 25, 2014 12:42 am

I figured out a work around but I would still be interested in a cleaner way to do it.

Code: Select all

        SDB.Player.Stop()
        SDB.Player.CurrentSongIndex = SDB.Player.CurrentSongIndex + 1
        SDB.Player.CurrentSong.StartTime = 30000
        SDB.ProcessMessages()
        SDB.Player.Play()
        While SDB.Player.isStartingPlayback
            SDB.ProcessMessages()
        End While
        SDB.Player.CurrentSong.StartTime = 0

mcow
Posts: 820
Joined: Sun Sep 21, 2008 9:35 pm
Location: Cupertino, California

Re: Problem with SDB.Player.PlaybackTime from a VB.net prog

Post by mcow » Sun Oct 26, 2014 1:12 pm

You can modify SDB.Player.CurrentSong.StartTime before Play() instead of changing PlaybackTime dynamically.

Post Reply