INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: AutoEQ  (Read 2319 times)

PaulSinnema

  • Galactic Citizen
  • ****
  • Posts: 393
  • You don't know what you're missing until its gone
AutoEQ
« 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:

Quote
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
Logged

PaulSinnema

  • Galactic Citizen
  • ****
  • Posts: 393
  • You don't know what you're missing until its gone
Re: AutoEQ
« Reply #1 on: April 21, 2011, 05:05:04 am »

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:

   
Code: [Select]
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
Logged

PaulSinnema

  • Galactic Citizen
  • ****
  • Posts: 393
  • You don't know what you're missing until its gone
Re: AutoEQ
« Reply #2 on: April 22, 2011, 01:50:25 am »

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
Logged

PaulSinnema

  • Galactic Citizen
  • ****
  • Posts: 393
  • You don't know what you're missing until its gone
Re: AutoEQ
« Reply #3 on: April 22, 2011, 03:55:53 am »

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.

Code: [Select]
private void checkBoxEQOnOff_CheckedChanged(object sender, EventArgs e)
{
try
{
mcMixer = mcRef.GetMJMixer();

mcMixer.EQOn = checkBoxEQOnOff.Checked;
}
catch (Exception ex)
{
errorHandler(ex);
}
}
Logged

PaulSinnema

  • Galactic Citizen
  • ****
  • Posts: 393
  • You don't know what you're missing until its gone
Re: AutoEQ
« Reply #4 on: April 22, 2011, 06:16:57 am »

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
Logged

PaulSinnema

  • Galactic Citizen
  • ****
  • Posts: 393
  • You don't know what you're missing until its gone
Re: AutoEQ
« Reply #5 on: April 22, 2011, 10:44:55 am »

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
Logged

PaulSinnema

  • Galactic Citizen
  • ****
  • Posts: 393
  • You don't know what you're missing until its gone
Re: AutoEQ
« Reply #6 on: April 23, 2011, 03:57:12 am »

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.

Code: [Select]
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
Logged
Pages: [1]   Go Up