INTERACT FORUM

Please login or register.

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

Author Topic: Get/SetEQBand mismatches values  (Read 7910 times)

PaulSinnema

  • Galactic Citizen
  • ****
  • Posts: 393
  • You don't know what you're missing until its gone
Get/SetEQBand mismatches values
« on: April 16, 2007, 09:39:13 am »

Hi,

I'm a bit in trouble with the current version of MC. Because I cannot use the Events which tell me the Equalizer has changed I had to revert to polling using a timer. When I select a preset from the Equalizer all the Bands are set to a certain value. My timer starts and gets the values which are then set in my own Equalizer. What I see is all Bands leveling themselves to zero after a few polls of my timer. I was very puzzled on how this could happen and found the following.

The value set with the SetEQBand(n) function results in the GetEQBand(n) to give me a different value which is always closer to zero than the one set. The code below shows this.

            mcRef.GetMJMixer().SetEQBand(1, -20);

            buttonEx1.Text = mcRef.GetMJMixer().GetEQBand(1).ToString(); // -19 is returned

Only the values 100, -100 and 0 return the same value for Set and Get.

Now this wouldn't be such a big problem if the Events were working. I could simply set the getValue and would be the end of it. Now my program start looping because of the polling.

Paul.
Logged

PaulSinnema

  • Galactic Citizen
  • ****
  • Posts: 393
  • You don't know what you're missing until its gone
Re: Get/SetEQBand mismatches values
« Reply #1 on: April 16, 2007, 02:19:42 pm »

Funny thing happened just now. I had lost my afternoon work because of stupid mistake and had to rebuild part of the plugin. The problem I reported here does not seem to reappear in the repaired version? I'll take a look at what I reported an get back on the subject.
Logged

scthom

  • Citizen of the Universe
  • *****
  • Posts: 621
Re: Get/SetEQBand mismatches values
« Reply #2 on: April 16, 2007, 02:44:22 pm »

I've never had that happen using my EQdb plugin.

Don't forget that the EQ bands are saved in -32 to +32, whereas the control has gradations of -100 to 100.  So when you scale one way, you have to remember to round off (up on the positive side, down on the negative side) to keep the integers correct.

When I first started that project, I tried my own equalizer too.  It didn't work out all that well.  Keeping the "real" one and yours synced was not that easy (there were no events then, and even now there aren't EQ events).  One thing you might want to look at is to implement your own DSP plugin (take over the Equalizer) that has it's own events.  Ultimately, that's why I decided not to do it that way.  In any case, polling just the equalizer is much better than before, where we had to poll the playlists and files.
Logged

PaulSinnema

  • Galactic Citizen
  • ****
  • Posts: 393
  • You don't know what you're missing until its gone
Re: Get/SetEQBand mismatches values
« Reply #3 on: April 16, 2007, 03:00:36 pm »

Scot,

Thanks for the reply. Well, as you might understand, my liitle problem sufaced again. Forgot to implement some old code. Now the same happens again, it's a real struggle. What do you mean saved -32 and 32. The documentation only states -100 and 100. Strange way to go. Why don't they use the same scale for the sliders as the bands? (See: http://wiki.jrmediacenter.com/index.php/MJMixerAutomation)

Paul.
Logged

KingSparta

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 20048
Re: Get/SetEQBand mismatches values
« Reply #4 on: April 16, 2007, 05:07:59 pm »

PaulSinnema

I think what the deal is is

It is 100- and 100+ but it does not use all 100 values so the closest you can get when setting the values are 0, 3, 6, 9, etc...

i played with it once and that's what i saw, i thought it was kind of weird also.
Logged
Retired Military, Airborne, Air Assault, And Flight Wings.
Model Trains, Internet, Ham Radio
https://MyAAGrapevines.com
Fayetteville, NC, USA

scthom

  • Citizen of the Universe
  • *****
  • Posts: 621
Re: Get/SetEQBand mismatches values
« Reply #5 on: April 16, 2007, 09:35:20 pm »

Right, something like that.  Note that it's really 31, not 32 as I mentioned above.

The slider control on the equalizer uses -100 to +100 (201 values).

The presets (in the registry) are stored using -31 to +31 (shifted to 48 to 110 ascii), or 63 values.  0x79 "O" is equal to 0.

So if you are trying to implement a preset (or store your own) then you have to convert from 63 values to 201 values.
Logged

scthom

  • Citizen of the Universe
  • *****
  • Posts: 621
Re: Get/SetEQBand mismatches values
« Reply #6 on: April 17, 2007, 12:40:50 am »

Actually, I may be experiencing your issue as well.  Need some time to debug and digest, but when I write to the mixer and then read from it, I also get slightly different results.  Typically if I read and write a couple of times in a row, then it evens out and all stays the same.  I'll write a "T" but get back a "U", then write a "U" and get back a "V".  Then write a "V" and get back a "V".
Logged

PaulSinnema

  • Galactic Citizen
  • ****
  • Posts: 393
  • You don't know what you're missing until its gone
Re: Get/SetEQBand mismatches values
« Reply #7 on: April 17, 2007, 12:45:15 am »

I realy think the development team has to take a look at this. For us the int 8)erface is clearly not workable. RFC please! 8)
Logged

PaulSinnema

  • Galactic Citizen
  • ****
  • Posts: 393
  • You don't know what you're missing until its gone
Re: Get/SetEQBand mismatches values
« Reply #8 on: April 17, 2007, 03:52:22 pm »

Bump too!
Logged

John Gateley

  • Citizen of the Universe
  • *****
  • Posts: 4957
  • Nice haircut
Re: Get/SetEQBand mismatches values
« Reply #9 on: April 17, 2007, 05:07:44 pm »

I've added some logging to help track this down. Turn on logging for SDK items, and all calls to the Get/Set functions are logged. If you can find a Get/Set pair that are mismatched, post the log here...

Available in the next build (tonight)...

j

scthom

  • Citizen of the Universe
  • *****
  • Posts: 621
Re: Get/SetEQBand mismatches values
« Reply #10 on: April 18, 2007, 12:56:18 am »

Noted.  Unable to test until tomorrow evening.

Thanks, J. 
Logged

PaulSinnema

  • Galactic Citizen
  • ****
  • Posts: 393
  • You don't know what you're missing until its gone
Re: Get/SetEQBand mismatches values
« Reply #11 on: April 18, 2007, 05:39:06 am »

Please explain how/what/where ?
Logged

John Gateley

  • Citizen of the Universe
  • *****
  • Posts: 4957
  • Nice haircut
Re: Get/SetEQBand mismatches values
« Reply #12 on: April 18, 2007, 10:59:48 am »

nevermind, I found it. A confusion between the mathematics of reals and ints...

j

John Gateley

  • Citizen of the Universe
  • *****
  • Posts: 4957
  • Nice haircut
Re: Get/SetEQBand mismatches values
« Reply #13 on: April 18, 2007, 01:17:39 pm »

fixed in the next build...

j

PaulSinnema

  • Galactic Citizen
  • ****
  • Posts: 393
  • You don't know what you're missing until its gone
Re: Get/SetEQBand mismatches values
« Reply #14 on: April 18, 2007, 02:20:05 pm »

Good work John, how do I get the next build?
Logged

John Gateley

  • Citizen of the Universe
  • *****
  • Posts: 4957
  • Nice haircut
Re: Get/SetEQBand mismatches values
« Reply #15 on: April 18, 2007, 03:05:56 pm »

I tried to get you on the beta team, but was refused. Sorry... --j

scthom

  • Citizen of the Universe
  • *****
  • Posts: 621
Re: Get/SetEQBand mismatches values
« Reply #16 on: April 18, 2007, 10:36:03 pm »

Weird results.

Only once did I get it to work correctly.  The other times, all I ever got from the mixer was a constant.  It's like the mixer object wasn't connected to the mixer any longer.  For example, if the track started as "Flat", all I could get out of the mixer was a zero.  If I had a track that was "Rock", it would set the mixer correctly and I could retrieve it correctly, but using the sliders on the mixer itself did not result in any changes despite repeated GetEQBand calls.

At first I thought the weird results were related to logging, but I was unable to repeat it.

The log never did show the entries that were supposed to be there (I assume you took them out when you fixed it).
Logged

John Gateley

  • Citizen of the Universe
  • *****
  • Posts: 4957
  • Nice haircut
Re: Get/SetEQBand mismatches values
« Reply #17 on: April 18, 2007, 10:44:46 pm »

Yes, I took the log calls out (shame on me). I'll take a look in the morning...

Thanks,

j

PaulSinnema

  • Galactic Citizen
  • ****
  • Posts: 393
  • You don't know what you're missing until its gone
Re: Get/SetEQBand mismatches values
« Reply #18 on: April 19, 2007, 02:27:46 am »

John,

If that's the case I'm definitly gonna stop developing plugins.

Bye.

Don't call me, I'll call you.
Logged

KingSparta

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 20048
Re: Get/SetEQBand mismatches values
« Reply #19 on: April 19, 2007, 05:31:49 am »

Not that my 2 Cents are worth much

I would think if a 3rd party programmer showed a active interest in creating a plug-in for Media Center or any other product that they may gain access to a few builds that A user may not have access to.

It is not like similar access was never granted before for other 3rd party programmers, who now have a direct link to the JRiver programing staff.

I don't feel his request is asking for too much, and should be reconsidered.
Logged
Retired Military, Airborne, Air Assault, And Flight Wings.
Model Trains, Internet, Ham Radio
https://MyAAGrapevines.com
Fayetteville, NC, USA

John Gateley

  • Citizen of the Universe
  • *****
  • Posts: 4957
  • Nice haircut
Re: Get/SetEQBand mismatches values
« Reply #20 on: April 19, 2007, 10:43:44 am »

Only once did I get it to work correctly.  The other times, all I ever got from the mixer was a constant.  It's like the mixer object wasn't connected to the mixer any longer.  For example, if the track started as "Flat", all I could get out of the mixer was a zero.  If I had a track that was "Rock", it would set the mixer correctly and I could retrieve it correctly, but using the sliders on the mixer itself did not result in any changes despite repeated GetEQBand calls.

I couldn't reproduce it, so I put the logging back in. I don't see how the change I made could "disconnect" the mixer object from the mixer, is there something else that might have affected it? Try the next build for the logging...

j

scthom

  • Citizen of the Universe
  • *****
  • Posts: 621
Re: Get/SetEQBand mismatches values
« Reply #21 on: April 20, 2007, 01:22:46 am »

John, this is from 217.

The first set of GetEQBand calls I don't think is mine because I don't call them until after I get my playlist.  I think they might belong to the DSP mixer which I assume is also the first Mixer object (#1).

The set after the playlist is mine, then every one after is mine also but triggered from the EQ_CHANGED event.  But notice how it closes and creates a new MJMixer every time (#3)?  I only call the GetMJMixer function the very first time (#2), after that it's just GetEQBand's.  I think that's why it seems disconnected -- every one of my GetEQBand calls goes to a new mixer.

If I do a SetEQBand, that does seem to work fine (though an event is fired every time, so it's a little slow).  Would it be possible to also have a SetEQ by whole string instead of just one band at a time?  It would be nice to have both available.

It might still be something in my code, but very similar code (no events) worked fine in my previous plugin with 11.

Code: [Select]
Media Center; Version: 12.0.217; Types: 4
0000000: 23100: SDK: CMCPlayerApp::InitializeAutomation: Start
0000000: 23100: SDK: CMCPlayerApp::InitializeAutomation: Finish (0 ms)
0000109: 23100: SDK: CMJMixerAutomation::CMJMixerAutomation: Global Count: 1
0000515: 23100: SDK: CMJAutomation::CMJAutomation: Global Count: 1, Main 0, 20fa898
0003547: 23100: SDK: CMJAutomation::CMJAutomation: Global Count: 2, Main 0, 192c970
0004547: 23100: SDK: CMJAutomation::CMJAutomation: Global Count: 3, Main 0, 192c8f0
0011203: 23100: SDK: CMJAutomation::CMJAutomation: Global Count: 4, Main 0, 2b443a8
0011203: 23100: SDK: CMJMixerAutomation::CMJMixerAutomation: Global Count: 2
0011203: 23100: SDK: CMJMixerAutomation::GetEQBand: Start
0011203: 23100: SDK: CMJMixerAutomation::GetEQBand: Returning 0/31(O)
0011203: 23100: SDK: CMJMixerAutomation::GetEQBand: Returning 39/19(C)
0011203: 23100: SDK: CMJMixerAutomation::GetEQBand: Returning 13/27(K)
0011218: 23100: SDK: CMJMixerAutomation::GetEQBand: Returning -18/37(U)
0011218: 23100: SDK: CMJMixerAutomation::GetEQBand: Returning -31/41(Y)
0011218: 23100: SDK: CMJMixerAutomation::GetEQBand: Returning -18/37(U)
0011218: 23100: SDK: CMJMixerAutomation::GetEQBand: Returning 3/30(N)
0011218: 23100: SDK: CMJMixerAutomation::GetEQBand: Returning 13/27(K)
0011234: 23100: SDK: CMJMixerAutomation::GetEQBand: Returning 39/19(C)
0011234: 23100: SDK: CMJMixerAutomation::GetEQBand: Returning 39/19(C)
0011234: 23100: SDK: CMJMixerAutomation::GetEQBand: Returning -99/62(n)
0011234: 23100: SDK: CMJMixerAutomation::GetEQBand: Finish
0011234: 23100: SDK: CMJCurPlaylistAutomation::CMJCurPlaylistAutomation: Global Count: 1
0011234: 23100: SDK: CMJMixerAutomation::GetEQBand: Start
0011250: 23100: SDK: CMJMixerAutomation::GetEQBand: Returning 0/31(O)
0011250: 23100: SDK: CMJMixerAutomation::GetEQBand: Returning 39/19(C)
0011250: 23100: SDK: CMJMixerAutomation::GetEQBand: Returning 13/27(K)
0011250: 23100: SDK: CMJMixerAutomation::GetEQBand: Returning -18/37(U)
0011265: 23100: SDK: CMJMixerAutomation::GetEQBand: Returning -31/41(Y)
0011265: 23100: SDK: CMJMixerAutomation::GetEQBand: Returning -18/37(U)
0011265: 23100: SDK: CMJMixerAutomation::GetEQBand: Returning 3/30(N)
0011281: 23100: SDK: CMJMixerAutomation::GetEQBand: Returning 13/27(K)
0011281: 23100: SDK: CMJMixerAutomation::GetEQBand: Returning 39/19(C)
0011281: 23100: SDK: CMJMixerAutomation::GetEQBand: Returning 39/19(C)
0011281: 23100: SDK: CMJMixerAutomation::GetEQBand: Returning -99/62(n)
0011281: 23100: SDK: CMJMixerAutomation::GetEQBand: Finish
0022000: 23100: SDK: CMJMixerAutomation::CMJMixerAutomation: Global Count: 3
0022000: 23100: SDK: CMJMixerAutomation::GetEQBand: Start
0022000: 23100: SDK: CMJMixerAutomation::GetEQBand: Returning 0/31(O)
0022000: 23100: SDK: CMJMixerAutomation::GetEQBand: Returning 39/19(C)
0022000: 23100: SDK: CMJMixerAutomation::GetEQBand: Returning 13/27(K)
0022015: 23100: SDK: CMJMixerAutomation::GetEQBand: Returning -18/37(U)
0022015: 23100: SDK: CMJMixerAutomation::GetEQBand: Returning -31/41(Y)
0022015: 23100: SDK: CMJMixerAutomation::GetEQBand: Returning -18/37(U)
0022015: 23100: SDK: CMJMixerAutomation::GetEQBand: Returning 3/30(N)
0022015: 23100: SDK: CMJMixerAutomation::GetEQBand: Returning 13/27(K)
0022031: 23100: SDK: CMJMixerAutomation::GetEQBand: Returning 39/19(C)
0022031: 23100: SDK: CMJMixerAutomation::GetEQBand: Returning 39/19(C)
0022031: 23100: SDK: CMJMixerAutomation::GetEQBand: Returning -99/62(n)
0022031: 23100: SDK: CMJMixerAutomation::GetEQBand: Finish
0022031: 23100: SDK: CMJMixerAutomation::OnFinalRelease: All objects released
0022031: 23100: SDK: CMJMixerAutomation::~CMJMixerAutomation: Global Count: 2
0027437: 23100: SDK: CMJMixerAutomation::CMJMixerAutomation: Global Count: 3
0027453: 23100: SDK: CMJMixerAutomation::GetEQBand: Start...
Logged

John Gateley

  • Citizen of the Universe
  • *****
  • Posts: 4957
  • Nice haircut
Re: Get/SetEQBand mismatches values
« Reply #22 on: April 20, 2007, 10:26:33 am »

Hi Scot,

Two things:
1) There are no calls to Set in the log you showed me.
2) I think the "different mixer" problem may be in your code somewhere. I think the mixer gets created every time you call the GetMJMixer automation function, so instead of calling this multiple times, call it once and save the result.

Let me know...

j

scthom

  • Citizen of the Universe
  • *****
  • Posts: 621
Re: Get/SetEQBand mismatches values
« Reply #23 on: April 20, 2007, 08:40:52 pm »

Two things:
1) There are no calls to Set in the log you showed me.
2) I think the "different mixer" problem may be in your code somewhere. I think the mixer gets created every time you call the GetMJMixer automation function, so instead of calling this multiple times, call it once and save the result.

Sorry I wasn't clear.  I did edit the log (and ran different tests).  The SetEQ functions all worked fine and as expected.  I only use the GetMJMixer function once, and then use m_pMixer->GetEQBand afterwards.  So that's why I was unexpectedly seeing multiple mixer objects created.
Logged

scthom

  • Citizen of the Universe
  • *****
  • Posts: 621
Re: Get/SetEQBand mismatches values
« Reply #24 on: April 21, 2007, 12:19:41 am »

Follow-up, after more testing.

I did re-arrange my functions such that the Advise is not sent before the MJMixer is obtained, but it didn't dramatically affect the results.  Turns out the first set of GetEQBands up there in the log (that I at first thought weren't mine) were actually the ones that came from the event triggered by me turning on the EQ using PutEQOn.  Note that that was prior to adequately finishing my Init.  So I now Advise last in Init, just in case.

Anyway, the extra Mixer objects are created when I click in the DSP Studio's Equalizer -- select a preset or click a slider to move it.  It goes away when the MJEvent handler function that is triggered when I do that exits.  But not inside my function, outside, as in inside MC.
Logged

Craig

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 612
Re: Get/SetEQBand mismatches values
« Reply #25 on: April 21, 2007, 03:19:04 am »

I've not tried acting on these events but for NOTIFY_VOLUME_CHANGED I'm seeing
'MCCommand -1' Ie the first parameter is '' instead of 'NOTIFY_VOLUME_CHANGED'.

It would be nice to get the zone number in there too ;-)

Craig
Logged
MC2Slim - Windows Shell and JRiver Media Center Integration for Squeezebox.

http://www.duff-zapp.co.uk

John Gateley

  • Citizen of the Universe
  • *****
  • Posts: 4957
  • Nice haircut
Re: Get/SetEQBand mismatches values
« Reply #26 on: April 21, 2007, 08:34:54 am »

Craig: I'll check on monday.

Scot: I'm sorry, I'm confused. Could you re-explain exactly what the problem is? I thought it was the Get/Set functions were not working, now I'm not sure...

j

scthom

  • Citizen of the Universe
  • *****
  • Posts: 621
Re: Get/SetEQBand mismatches values
« Reply #27 on: April 21, 2007, 10:39:46 am »

Scot: I'm sorry, I'm confused. Could you re-explain exactly what the problem is? I thought it was the Get/Set functions were not working, now I'm not sure...

Trying to be succint  :)

My problem is that when I call GetEQBand, I don't get the proper values from the mixer.  SetEQBand works fine for me now.

The problem with the GetEQBand calls appears to be that (somehow) MC is creating a new mixer object when I click in the DSP Studio mixer instead of using the existing one.  It's not obvious in my code since I only have the one GetMJMixer function call in Init.

I've got MC set to emit debug strings into VStudio, so I'll track down something over the weekend.
Logged

scthom

  • Citizen of the Universe
  • *****
  • Posts: 621
Re: Get/SetEQBand mismatches values
« Reply #28 on: April 21, 2007, 12:13:12 pm »

Init function snippet (edited):
Code: [Select]
m_pMJ.Attach((IMJAutomation *) d, TRUE);

// Get a mixer object
m_pMixer = m_pMJ->GetMJMixer();
m_pMixer->PutEQOn(TRUE); // triggers event (except not advised yet)

// Get a playlist object
m_pCurPlayList = m_pMJ->GetCurPlaylist();

UpdateMixerSetting(); // calls GetEQBand

hr = DispEventAdvise(m_pMJ, &DIID_IMJAutomationEvents);

Matching log file (edited):
Code: [Select]
0012484: 29232: SDK: CMJAutomation::CMJAutomation: Global Count: 4, Main 0, 2a4eae8
QIThunk - 18        AddRef  : Object = 0x056662E0 Refcount = 1 CEQdbCtrl - IDispatch
0012484: 29232: SDK: CMJMixerAutomation::CMJMixerAutomation: Global Count: 2
HereHereHereHere
0012484: 29232: SDK: CMJCurPlaylistAutomation::CMJCurPlaylistAutomation: Global Count: 1
0012484: 29232: SDK: CMJMixerAutomation::GetEQBand: Start
0012484: 29232: SDK: CMJMixerAutomation::GetEQBand: Returning 0/31(O)
0012484: 29232: SDK: CMJMixerAutomation::GetEQBand: Returning 39/19(C)
0012500: 29232: SDK: CMJMixerAutomation::GetEQBand: Returning 13/27(K)
0012500: 29232: SDK: CMJMixerAutomation::GetEQBand: Returning -18/37(U)
0012500: 29232: SDK: CMJMixerAutomation::GetEQBand: Returning -31/41(Y)
0012500: 29232: SDK: CMJMixerAutomation::GetEQBand: Returning -18/37(U)
0012500: 29232: SDK: CMJMixerAutomation::GetEQBand: Returning 3/30(N)
0012500: 29232: SDK: CMJMixerAutomation::GetEQBand: Returning 13/27(K)
0012500: 29232: SDK: CMJMixerAutomation::GetEQBand: Returning 39/19(C)
0012500: 29232: SDK: CMJMixerAutomation::GetEQBand: Returning 39/19(C)
0012500: 29232: SDK: CMJMixerAutomation::GetEQBand: Returning 39/19(C)
0012500: 29232: SDK: CMJMixerAutomation::GetEQBand: Finish (0 ms)
QIThunk - 19        AddRef  : Object = 0x05666384 Refcount = 1 IDispEventImpl - IMJAutomationEvents

So my Automation pointer is global count 4, my MixerAutomation pointer is global count 2.

The "HereHereHereHere" seems to be emitted by Windows (?) -- it occurs even when MC debug strings are off and it's not in my code.

The PlaylistAutomation is mine, global count 1.
The first GetEQBand calls (from my function UpdateMixerSetting) work as expected ("Rock" preset).
The final QueryInterface Thunk 19 is when I advise the sink (IMJAutomationEvents interface).
So that all appears to be normal.


Next, I click the DSP studio button to bring up the mixer.  I get this in my log (normal).

Code: [Select]
'Media Center 12.exe': Loaded 'C:\Program Files\J River\Media Center 12\Plugins\dsp_MJMain.dll', Binary was not built with debug information.

So then I click the preset to select "Live".  Here's the log (edited).  Note that a new mixer object (3) was created and the GetEQBand calls in my event handler returned the same as the above calls, which is the "Rock" preset.  The DSP studio has, in fact, changed to the "Live" preset.  I suspect Mixer object #2 has the right settings.

Also note the "HereHereHereHere" again which seems to be associated with the new MixerAutomation object.

Code: [Select]
1158297: 29232: SDK: CMJMixerAutomation::CMJMixerAutomation: Global Count: 3
HereHereHereHere
EQdbCtrl::MJEvent(MJEvent type: MCCommand, MCC: NOTIFY_EQ_CHANGED, -1)
1158312: 29232: SDK: CMJMixerAutomation::GetEQBand: Start
1158312: 29232: SDK: CMJMixerAutomation::GetEQBand: Returning 0/31(O)
1158312: 29232: SDK: CMJMixerAutomation::GetEQBand: Returning 39/19(C)
1158312: 29232: SDK: CMJMixerAutomation::GetEQBand: Returning 13/27(K)
1158312: 29232: SDK: CMJMixerAutomation::GetEQBand: Returning -18/37(U)
1158312: 29232: SDK: CMJMixerAutomation::GetEQBand: Returning -31/41(Y)
1158312: 29232: SDK: CMJMixerAutomation::GetEQBand: Returning -18/37(U)
1158312: 29232: SDK: CMJMixerAutomation::GetEQBand: Returning 3/30(N)
1158312: 29232: SDK: CMJMixerAutomation::GetEQBand: Returning 13/27(K)
1158312: 29232: SDK: CMJMixerAutomation::GetEQBand: Returning 39/19(C)
1158312: 29232: SDK: CMJMixerAutomation::GetEQBand: Returning 39/19(C)
1158312: 29232: SDK: CMJMixerAutomation::GetEQBand: Returning 39/19(C)
1158312: 29232: SDK: CMJMixerAutomation::GetEQBand: Finish (0 ms)
1158312: 29232: SDK: CMJMixerAutomation::OnFinalRelease: All objects released
1158312: 29232: SDK: CMJMixerAutomation::~CMJMixerAutomation: Global Count: 2
'Media Center 12.exe': Unloaded 'C:\WINDOWS\system32\cewmdm.dll'

My event handler that goes with the above log looks like this (edited):

Code: [Select]
BEGIN_SINK_MAP(CEQdbCtrl)
SINK_ENTRY_EX(1, DIID_IMJAutomationEvents, 1, MJEvent)
END_SINK_MAP()

STDMETHODIMP_(void) CEQdbCtrl::MJEvent(LPCTSTR strType, LPCTSTR strParam1, LPCTSTR strParam2)
{
log << "EQdbCtrl::MJEvent(" << strType << ", " << strParam1 << ", " << strParam2 << ")" << endl;

CString e = strParam1;

if(e.CompareNoCase(_T("MCC: NOTIFY_EQ_CHANGED")) == 0)
UpdateMixerSetting();
}
Logged

scthom

  • Citizen of the Universe
  • *****
  • Posts: 621
Re: Get/SetEQBand mismatches values
« Reply #29 on: April 21, 2007, 12:24:35 pm »

PS That was all with 217.

Summary: my event handler is getting the incorrect mixer object for some reason.  I'm not making a new one (at least not on purpose) and given the location of the new object vs my event handler function, it looks like MC is the culprit.

Since I don't have symbols for MC, the call stack just has a bunch of MediaCenter12.exe, dsp_Main.dll, and JRTools.dll function calls before I get the Invoke function call of the event.
Logged

scthom

  • Citizen of the Universe
  • *****
  • Posts: 621
Re: Get/SetEQBand mismatches values
« Reply #30 on: April 21, 2007, 09:37:17 pm »

Though totally counter-intuitive, I tried getting a new mixer object every time, and now it works fine.  So maybe I was misunderstanding you (no surprise there).

Code: [Select]
void CEQdbCtrl::GetSettingsFromMixer(CString &Settings)
{
Settings = _T("");
m_pMixer = m_pMJ->GetMJMixer();  // this is the line I added
for(int i = 0; i < 11; i++) {
Settings.AppendChar(ParseMixer(i));
}
return;
}
Logged

John Gateley

  • Citizen of the Universe
  • *****
  • Posts: 4957
  • Nice haircut
Re: Get/SetEQBand mismatches values
« Reply #31 on: April 23, 2007, 01:19:35 pm »

No, you weren't misunderstanding me. Thanks for the careful debugging. I'll take a look at it when I get a chance, for now, create a mixer object each time you need. This seems like a case that no one has thought about yet...

j

PaulSinnema

  • Galactic Citizen
  • ****
  • Posts: 393
  • You don't know what you're missing until its gone
Re: Get/SetEQBand mismatches values
« Reply #32 on: April 24, 2007, 01:40:09 pm »

John,

I can confirm Scot's findings. I also need to get a Mixer Object each time I get a Mixer Changed Event.

Paul.
Logged

John Gateley

  • Citizen of the Universe
  • *****
  • Posts: 4957
  • Nice haircut
Re: Get/SetEQBand mismatches values
« Reply #33 on: April 26, 2007, 03:07:03 pm »

I've not tried acting on these events but for NOTIFY_VOLUME_CHANGED I'm seeing
'MCCommand -1' Ie the first parameter is '' instead of 'NOTIFY_VOLUME_CHANGED'.

It would be nice to get the zone number in there too ;-)

Craig

Hi Craig,

Try the next version - I did some boneheaded editing and messed up the signaling of the volume changed events.

j

John Gateley

  • Citizen of the Universe
  • *****
  • Posts: 4957
  • Nice haircut
Re: Get/SetEQBand mismatches values
« Reply #34 on: April 26, 2007, 03:50:46 pm »

Summary: my event handler is getting the incorrect mixer object for some reason.  I'm not making a new one (at least not on purpose) and given the location of the new object vs my event handler function, it looks like MC is the culprit.

Fixed in the next build.

j

PaulSinnema

  • Galactic Citizen
  • ****
  • Posts: 393
  • You don't know what you're missing until its gone
Re: Get/SetEQBand mismatches values
« Reply #35 on: April 27, 2007, 09:14:50 am »

Fixed in the next build.

j


I'll try it out tonight.
Logged

PaulSinnema

  • Galactic Citizen
  • ****
  • Posts: 393
  • You don't know what you're missing until its gone
Re: Get/SetEQBand mismatches values
« Reply #36 on: April 27, 2007, 04:08:50 pm »

John,

Yep, It work fine. I've finished the work on my first plugin. Although the code could be structured a bit better I think this is not at all bad. I'll make it available soon.

Paul.
Logged
Pages: [1]   Go Up