Volume Change Events

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

Moderators: Gurus, Addon Administrators

endee

Volume Change Events

Post by endee »

Hi,
I'm building a python application that is responding to changes in playback from Media Monkey, and can't seem to find the right event for responding to volume changes in Media Monkey.

I followed this: http://www.mediamonkey.com/wiki/index.p ... t_handling for other events and it worked great. Hoping for some help if it is possible.

Thanks!
mcow
Posts: 834
Joined: Sun Sep 21, 2008 9:35 pm
Location: Cupertino, California

Re: Volume Change Events

Post by mcow »

I don't think they issue events for that. See the second table at:
http://www.mediamonkey.com/wiki/index.p ... pplication

The way I handle items that aren't notified is, I query them. Like, every pass around the loop, I read values from the SDB. It's definitely not ideal, but you can access the volume from SDB.Player.Volume.

Also, I recommend not using OnIdle() for anything, but define it:

Code: Select all

def OnIdle(self):
    pass
If you don't define it, MM tries to call it anyway; the debug version emits "Failed calling of COM event" -- which it does only when OnIdle() is not defined, the other methods don't trigger that.
Every time I've put actual logic inside OnIdle, the MM UI slows to a crawl. It's called very often.
Even without logic inside, just the existence of an event-handling SDB object causes problems with MMW's window, in particular when trying to restore after minimizing.
endee

Re: Volume Change Events

Post by endee »

Thanks! I was hoping to avoid having to constantly query it but I suppose it is unavoidable... Good to know :)
Post Reply