How to stop playback before any sound

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

Moderators: Gurus, Addon Administrators

CarlitoGil
Posts: 294
Joined: Sun Sep 07, 2008 10:46 am
Location: Dominican Republic
Contact:

How to stop playback before any sound

Post by CarlitoGil »

I want to play some files with an external application.

How can I stop a song from playing before any sound is played?

Code: Select all

Call Script.RegisterEvent(SDB,"OnPlay","EventOnPlay")

Sub EventOnPlay()
	SDB.Player.Stop() ' By the time this is called it has already played a second or so
End Sub
iTunesMonkey + Acoustid – Find metadata from iTunes and Acoustid
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Re: How to stop playback before any sound

Post by trixmoto »

Couldn't you just mute MM? You can do this by setting the SDB.Player.Volume to 0.
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
CarlitoGil
Posts: 294
Joined: Sun Sep 07, 2008 10:46 am
Location: Dominican Republic
Contact:

Re: How to stop playback before any sound

Post by CarlitoGil »

trixmoto wrote:Couldn't you just mute MM? You can do this by setting the SDB.Player.Volume to 0.
The script should be conditional.
Only SOME files would be stopped.
Mute would affect all files.
iTunesMonkey + Acoustid – Find metadata from iTunes and Acoustid
Eyal
Posts: 3118
Joined: Sun Jun 26, 2005 9:27 am
Location: Québec
Contact:

Re: How to stop playback before any sound

Post by Eyal »

According to SDB.Player.IsStartingPlayback, it seems we have to wait (and can't do anything) until playback has begun:
http://www.mediamonkey.com/wiki/index.p ... ngPlayback

.
Skins for MediaMonkey: Cafe, Carbon, Helium, Spotify, Zekton. [ Wiki Zone ].
CarlitoGil
Posts: 294
Joined: Sun Sep 07, 2008 10:46 am
Location: Dominican Republic
Contact:

Re: How to stop playback before any sound

Post by CarlitoGil »

Maybe it should be suggested as a new event for MM4, OnBeforePlay
iTunesMonkey + Acoustid – Find metadata from iTunes and Acoustid
Eyal
Posts: 3118
Joined: Sun Jun 26, 2005 9:27 am
Location: Québec
Contact:

Re: How to stop playback before any sound

Post by Eyal »

How about setting MM to play through an external player?
Tools | Options | Player > Choose player = *.exe

I occasionally use this setting to use QCDPlayer.exe instead.
Skins for MediaMonkey: Cafe, Carbon, Helium, Spotify, Zekton. [ Wiki Zone ].
CarlitoGil
Posts: 294
Joined: Sun Sep 07, 2008 10:46 am
Location: Dominican Republic
Contact:

Re: How to stop playback before any sound

Post by CarlitoGil »

Eyal wrote:Tools | Options | Player > Choose player = *.exe
Whoa, I didn't remember that setting
iTunesMonkey + Acoustid – Find metadata from iTunes and Acoustid
Post Reply