Volume Change Events

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

Moderator: Gurus


Volume Change Events

Post by endee » Mon Jun 09, 2014 7:34 pm

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.


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

Re: Volume Change Events

Post by mcow » Tue Jun 10, 2014 11:39 pm

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):
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.


Re: Volume Change Events

Post by endee » Thu Jun 12, 2014 11:45 am

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

Post Reply