INTERACT FORUM

Windows => Plug-in Development => Topic started by: PaulSinnema on April 24, 2007, 01:55:38 pm

Title: NOTIFY_EQ_CHANGED fires too early
Post by: PaulSinnema on April 24, 2007, 01:55:38 pm
Hi,

I've now implemented the new Event NOTIFY_EQ_CHANGED (works very nice for the 'GetEQBand') and found the folowing. When I disable the Equalizer in the DSP an Event is fired before the boolean is set to False. The 'EQOn' function still return 'true'. This causes my local on/off button to stay in the 'On' position while the DSP checkbox goes to 'Off'. A second click on the checkbox in the DSP Window then causes my button to go to the 'Off' state which in turn sets the DSP checkbox to 'Off' which then stays 'Off'. This little game can be repeated for the 'On' situation as well.

Paul.
Title: Re: NOTIFY_EQ_CHANGED fires too early
Post by: PaulSinnema on April 26, 2007, 11:31:00 am
Hi,

Solved it. Had to remove my eventhandler from the button before setting the value like this.

Code: [Select]
        private void setEQOnOff ()
        {
            mcMixer = mcRef.GetMJMixer ();

            this.checkBoxEQOnOff.CheckedChanged -= new System.EventHandler ( this.checkBoxEQOnOff_CheckedChanged );
            this.checkBoxEQOnOff.Checked = mcMixer.EQOn;
            this.checkBoxEQOnOff.CheckedChanged += new System.EventHandler ( this.checkBoxEQOnOff_CheckedChanged );
        }


Paul.
Title: Re: NOTIFY_EQ_CHANGED fires too early
Post by: PaulSinnema on April 26, 2007, 11:43:12 am
Well, I misinterpreted. It does stop the 2-time-click problem but now when I click the equalizer off in MC it tuns mine on and vice versa. When I click my equalizer button the first click doesn't do anything (because it is already on or off).

The problem still stands.

Paul.
Title: Re: NOTIFY_EQ_CHANGED fires too early
Post by: John Gateley on April 26, 2007, 11:50:29 am
When I disable the Equalizer in the DSP an Event is fired before the boolean is set to False. The 'EQOn' function still return 'true'.

What event is fired? The MCC: NOTIFY_EQ_CHANGED event? If so, this event is fired AFTER the boolean changes. If not, what event is it?

j
Title: Re: NOTIFY_EQ_CHANGED fires too early
Post by: PaulSinnema on April 26, 2007, 12:03:56 pm
Hi John,

Yep, exactly that event is fired.

Paul.
Title: Re: NOTIFY_EQ_CHANGED fires too early
Post by: PaulSinnema on April 26, 2007, 12:32:00 pm
John,

What you see here is in the lower left corner of the image the 2 Events that fired and a display of the EQOn value. The first click disabled the EQ the second enabled it. In the Upper left Corner you can see my button reflecting quite the oposite of the EQOn value. If it were on it would be green.

Paul.

(http://www.paulsinnema.net/images/MC/EQOnOffProblem.gif)
Title: Re: NOTIFY_EQ_CHANGED fires too early
Post by: John Gateley on April 26, 2007, 02:25:41 pm
Ok, fixed, and I updated the wiki docs a little.

Title: Re: NOTIFY_EQ_CHANGED fires too early
Post by: PaulSinnema on April 26, 2007, 02:52:55 pm
John,

Wauw, that's fast. Will it be on the next build?

While I'm at it. Is there a way to store information into the MC configuration for later use?

Paul.
Title: Re: NOTIFY_EQ_CHANGED fires too early
Post by: John Gateley on April 26, 2007, 03:02:25 pm
Yes, next build.

What do you mean "store information into the MC configuration"? What kind of information exactly? Store it somewhere in the registry?

j
Title: Re: NOTIFY_EQ_CHANGED fires too early
Post by: PaulSinnema on April 26, 2007, 03:03:47 pm
I need to set some default on startup but would like the end-user to be able to set them. The Registry is of course a possibilty. Is that where MC stores all it's values?
Title: Re: NOTIFY_EQ_CHANGED fires too early
Post by: John Gateley on April 26, 2007, 03:55:57 pm
That's what I use for the various sharing servers. Store the values in the registry, but make a dialog box to let the user change them.

j
Title: Re: NOTIFY_EQ_CHANGED fires too early
Post by: PaulSinnema on April 26, 2007, 04:30:35 pm
John,

You gave me the right hint. Built it in already. Plugin is nearing it's first beta. Still got a few questions.


Wow, is that the time. I'm in bed. See you tomorrow.

Paul.
Title: Re: NOTIFY_EQ_CHANGED fires too early
Post by: John Gateley on April 26, 2007, 04:47:28 pm
Not now... if they become high demand I can put them in...

j
Title: Re: NOTIFY_EQ_CHANGED fires too early
Post by: scthom on April 27, 2007, 12:11:51 am
The presets are in the registy.  HKCU\Software\JRiver\Media Center 12\Plugins\DSP\MJ DSP\EQ Presets.
Title: Re: NOTIFY_EQ_CHANGED fires too early
Post by: PaulSinnema on April 27, 2007, 01:43:07 am
Now why didn't I think of that. Of course they are in the registry. That'll do. Problem is if JRiver relocates them I will not be able to find them (like the 'Media Center 11' and 'Media Center 12' change. If there's functionality in the program I can always find them.
Title: Re: NOTIFY_EQ_CHANGED fires too early
Post by: scthom on April 27, 2007, 09:22:26 am
There's a function to return the version number.  Use that to work up the complete registry path.
Title: Re: NOTIFY_EQ_CHANGED fires too early
Post by: PaulSinnema on April 27, 2007, 01:14:08 pm
Good thinking Scot. I'll implement that in the next version. For now I'm pleased with this version for now. It doesn't have the presets available directly, but if you choose them from the MC Equalizer, mine syncs up. I'll be releasing the first version very soon. How do I upload for betatesters?