SoundMixerEx

Questions and comments specific to a particular plugin should go here.
User avatar
dexter98
Plugin Developer
Posts: 49
Joined: Sun Dec 30, 2007 2:45 am
Location: Netherlands
Contact:

SoundMixerEx

Post by dexter98 » Thu Feb 28, 2008 3:06 pm

This thread is for support on the SoundMixerEx plugin.

This plugin is an extension of the standard SoundMixer controls in EventGhost and allows you to setup virtually ANY slider and on/off switch (eg mute, digital out on/off) on one or more sound cards.

Multiple controls can be controlled on multiple sound cards through the same plugin. I personally use this plugin to switch on/off the 'digital out only' feature on my Audigy to be able to output (analog) sound, even when pass-through is active (which normally blocks any sound output other than the DD/DTS source).
Attachments
SoundMixerEx.rar
(4.55 KiB) Downloaded 958 times

Bartman
Plugin Developer
Posts: 881
Joined: Sun Feb 12, 2006 9:03 am

Re: SoundMixerEx plugin

Post by Bartman » Sat Mar 01, 2008 2:35 pm

I am currently trying under Vista.
I have some issues:
It seems the names get cut off in the half. (see first image)
All faders seem to get assigned to the first sound card. But if I select one in the tree the action is called "Decreases volume x on sound card 2".
Attachments
mixer2.png
mixer1.png

User avatar
dexter98
Plugin Developer
Posts: 49
Joined: Sun Dec 30, 2007 2:45 am
Location: Netherlands
Contact:

Re: SoundMixerEx plugin

Post by dexter98 » Sun Mar 02, 2008 4:06 pm

Hmmm, it seems that each control is seen as a seperate soundcard for some strange reason.

I really have to look into this under Vista and since I currently don't have a machine running it here somewhere, it can take a while before I can take a good look at it.

However, it is promising that the controls are exposed to the original API functions anyway... Maybe it is possible to control only with a few tricks and fixes.


Have you tested it under XP on the same system? And does it run ok under XP?

User avatar
Bitmonster
Site Admin
Posts: 2239
Joined: Mon Feb 06, 2006 10:28 pm

Re: SoundMixerEx plugin

Post by Bitmonster » Tue Mar 04, 2008 11:32 am

This plugin is now included in the latest beta version.
Please post software-related questions in the forum - PMs will only be answered, if really private, thanks!

User avatar
dexter98
Plugin Developer
Posts: 49
Joined: Sun Dec 30, 2007 2:45 am
Location: Netherlands
Contact:

Re: SoundMixerEx plugin

Post by dexter98 » Wed Mar 05, 2008 11:55 pm

Great! What to do with it is currently not Vista compatible?

Bartman
Plugin Developer
Posts: 881
Joined: Sun Feb 12, 2006 9:03 am

Re: SoundMixerEx plugin

Post by Bartman » Thu Mar 06, 2008 12:11 am

I suspect there is something wrong with the enumeration. It is odd that the action names to not correspond to the names in the tree.

User avatar
Bitmonster
Site Admin
Posts: 2239
Joined: Mon Feb 06, 2006 10:28 pm

Re: SoundMixerEx plugin

Post by Bitmonster » Thu Mar 06, 2008 12:33 am

Even though MS said, under Vista the SoundMixer API is still supported, there seem do be some differences. For example it is no longer possible to control the master volume. It is mapped to a new application volume.

I guess it would be the best to use the new Vista API for this. It works completely different, but one might be able to let look like the Sound Mixer Ex plugin for Windows XP.

http://msdn2.microsoft.com/en-us/library/ms678715.aspx
http://www.eventghost.org/forum/viewtopic.php?f=4&t=271
Please post software-related questions in the forum - PMs will only be answered, if really private, thanks!

User avatar
dexter98
Plugin Developer
Posts: 49
Joined: Sun Dec 30, 2007 2:45 am
Location: Netherlands
Contact:

Re: SoundMixerEx plugin

Post by dexter98 » Thu Mar 06, 2008 1:55 am

I really don't understand what's going wrong, although it's difficult to try to find the problem without having Vista running here.

However, if some sort of legacy API is exposed by Vista in some sort of way, there shouldn't actually be a problem I think using the 'old' API, especially because you select the control manually anyway.

It looks like enumeration works, but the parameters passed to the tree-building function are shifted in some sort of strange way...

If you select a control, does it work?

I've added an updated version of the plugin, which may work better, or, at least, more predicatble...
Attachments
__init__.py
(18.34 KiB) Downloaded 539 times

User avatar
topix
Experienced User
Posts: 380
Joined: Sat May 05, 2007 3:43 pm
Location: Germany
Contact:

Re: SoundMixerEx plugin

Post by topix » Thu Mar 06, 2008 6:04 pm

I tried the plugin on Vista64. When I add a macro i get the following error:

Code: Select all

Error while configuring: %s Sound Mixer Ex: No device/control selected
Traceback (most recent call last):
  File "C:\Program Files (x86)\EventGhost\eg\Classes\MainFrame\__init__.py", line 779, in OnCmdNewMacro
    eg.UndoHandler.NewMacro().Do(self.document)
  File "C:\Program Files (x86)\EventGhost\eg\Utils.py", line 223, in Wrapper
    return gr.switch(*args, **kwargs)
  File "C:\Program Files (x86)\EventGhost\eg\Classes\UndoHandler\NewMacro.py", line 66, in Do
    actionObj = eg.UndoHandler.NewAction().Do(document, action)
  File "C:\Program Files (x86)\EventGhost\eg\Classes\UndoHandler\NewAction.py", line 60, in Do
    if not eg.UndoHandler.Configure().Do(item, True):
  File "C:\Program Files (x86)\EventGhost\eg\Classes\UndoHandler\Configure.py", line 53, in Do
    newArgs = gr.switch(*item.GetArgs())
  File "c:\Program Files (x86)\EventGhost\plugins\SoundMixerEx\__init__.py", line 449, in Configure
    treeCtrl = self.plugin.GetTree(panel, ("Switch"), deviceId, controlId)
  File "c:\Program Files (x86)\EventGhost\plugins\SoundMixerEx\__init__.py", line 402, in GetTree
    description = "%s on '%s'" % (description, mixerName)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe4 in position 20: ordinal not in range(128)

User avatar
dexter98
Plugin Developer
Posts: 49
Joined: Sun Dec 30, 2007 2:45 am
Location: Netherlands
Contact:

Re: SoundMixerEx plugin

Post by dexter98 » Thu Mar 06, 2008 9:27 pm

@topix
This error seems to be generated by something else. I'm looking into it.

User avatar
dexter98
Plugin Developer
Posts: 49
Joined: Sun Dec 30, 2007 2:45 am
Location: Netherlands
Contact:

Re: SoundMixerEx plugin

Post by dexter98 » Thu Mar 06, 2008 10:55 pm

Hmmm, ok. Don't really know where this is coming from.

Could it have something to do with 'mixerControl.szName.decode("mbcs")'?

User avatar
topix
Experienced User
Posts: 380
Joined: Sat May 05, 2007 3:43 pm
Location: Germany
Contact:

Re: SoundMixerEx plugin

Post by topix » Fri Mar 07, 2008 5:58 pm

Yes, it could :wink: I removed all .decode("mbcs") in the plugin. Now i can add the macros and get the following list:

Image

It doesn't matter which one i use, it will only affect EG. No entry takes affect on the Mastervolume.

Image

User avatar
dexter98
Plugin Developer
Posts: 49
Joined: Sun Dec 30, 2007 2:45 am
Location: Netherlands
Contact:

Re: SoundMixerEx plugin

Post by dexter98 » Fri Mar 07, 2008 6:20 pm

Have you tried it with the new .py file attached just above?

User avatar
topix
Experienced User
Posts: 380
Joined: Sat May 05, 2007 3:43 pm
Location: Germany
Contact:

Re: SoundMixerEx plugin

Post by topix » Fri Mar 07, 2008 8:50 pm

oops. I thought the version in EG.1295 were the latest. :oops: With the above version I have less items in the list. Still can only mute the volume for EG, but i think that is because of new API in Vista. :|

User avatar
dexter98
Plugin Developer
Posts: 49
Joined: Sun Dec 30, 2007 2:45 am
Location: Netherlands
Contact:

Re: SoundMixerEx plugin

Post by dexter98 » Sat Mar 08, 2008 10:03 pm

I assume you use 'Use sound fader/slider' in the Add Action part.

Post Reply