INTERACT FORUM
Windows => Third Party Plug-ins, Programs, and Skins => Topic started by: PaulSinnema on March 22, 2011, 08:19:15 am
-
Hi All,
It's been a while. I've had a question from Arvi about AutoEQ (the plugin I wrote). It's not compatible with MC15/16 because of libraries that need to be used at compile time.
Now I know that one can load libraries dynamically but maybe one of you MC Guys has a code snippet for me for dynamically loading the MC libraries?
Regards
Paul
Here's the answer I gave Arvi:
Hi Arvi,
The problem is that my plugin needs to be compiled with libraries of MC15/16 before it can work. There's a workaround for that (dynamically loading the libraries). I'll take a look shortly. Maybe one of the MC guys can give me a code snippet to do this?
Regards
Paul
-
Hi,
I've had a bit of a struggle recovering my sources but I'm up again but not running.
I see that there have been some changes to the libraries used with MC15. I would like to use the old stuff again. Is that still arround or has the API changed dramatically?
I earlier used this construction:
public partial class MainInterface : Library.CMCPlugin
{
private MediaCenter.MCAutomation mcRef;
private MediaCenter.IMJMixerAutomation mcMixer;
public override void Init(MediaCenter.MCAutomation mcRef)
{
try
{
this.mcRef = mcRef;
if (checkVersion())
{
this.mcMixer = this.mcRef.GetMJMixer();
this.mcRef.FireMJEvent += new IMJAutomationEvents_FireMJEventEventHandler(MJEvent);
initBands();
initAll();
base.Init(mcRef);
}
}
catch (Exception e)
{
errorHandler(e);
}
}
Is this still the way it's done.
I can't find the 'Interop.MediaCenter' dll's anymore.
Regards
Paul Sinnema
-
Hi,
Ok, I think I solved it. With the install of MC15 I see a Type Library called 'Media Center 15.tlb'. I used the tool 'tlbimp.exe' delivered with Visual Studio which in turn creates a new assembly called 'MediaCenter.dll' which I can add to my preferences and voila... all the functionallity of MC is available again.
Regards
Paul
-
This solution is better than the one I had before. I've just tested the plugin with MC14 and it just works, great!
I would like report a bug however. I've got togglebutton on my plugin that switches the equalizer on/off. This does not seem to work anymore. I do get notified that the equalizer has been swithed on/off in the DSP Dialog but setting the EQOn to true/false has no effect in the DSP Studio.
private void checkBoxEQOnOff_CheckedChanged(object sender, EventArgs e)
{
try
{
mcMixer = mcRef.GetMJMixer();
mcMixer.EQOn = checkBoxEQOnOff.Checked;
}
catch (Exception ex)
{
errorHandler(ex);
}
}
-
Hi,
I've just uploaded the latest version of AutoEQ. If the problem with the EQOn has been found and I need to do some more work please let me know.
Regards
Paul
-
Hi,
Ok, I think I solved it. With the install of MC15 I see a Type Library called 'Media Center 15.tlb'. I used the tool 'tlbimp.exe' delivered with Visual Studio which in turn creates a new assembly called 'MediaCenter.dll' which I can add to my preferences and voila... all the functionallity of MC is available again.
Regards
Paul
Take a look here to see how it's done: http://wiki.jriver.com/index.php/How_to_use_MC_methods_in_.Net_projects
-
This solution is better than the one I had before. I've just tested the plugin with MC14 and it just works, great!
I would like report a bug however. I've got togglebutton on my plugin that switches the equalizer on/off. This does not seem to work anymore. I do get notified that the equalizer has been swithed on/off in the DSP Dialog but setting the EQOn to true/false has no effect in the DSP Studio.
private void checkBoxEQOnOff_CheckedChanged(object sender, EventArgs e)
{
try
{
mcMixer = mcRef.GetMJMixer();
mcMixer.EQOn = checkBoxEQOnOff.Checked;
}
catch (Exception ex)
{
errorHandler(ex);
}
}
Reported this bug in the 'Plug-in Development' Forum here: http://yabb.jriver.com/interact/index.php?topic=63714.msg425777#msg425777