Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details

If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.

SoundMixerEx

Questions and comments specific to a particular plugin should go here.
User avatar
Livin
Experienced User
Posts: 792
Joined: Wed Oct 08, 2008 4:56 am

Re: SoundMixerEx

Post by Livin »

Dexter,
Please join the convo here...

http://www.eventghost.org/forum/viewtop ... 6248#p6248

From the reading I've done on ASIO4ALL, it might be easier than you think to interface into it. I'm not a coder (was about 15 yrs ago) but I work with coders for my job so I do understand to a good level what they go through.

Thanks for the input!
setup... XBMC, W7MC for DVR & Live OTA TV, JRMC for multi-zone audio, EG, MiCasaVerde Vera3, USB-UIRT IR receiver, Harmony remote, 5.2 home theater system
Beholder
Posts: 24
Joined: Sat Apr 18, 2009 3:39 pm

Re: SoundMixerEx

Post by Beholder »

Hi Dexter,

this plugin does not work at all with SoundBlaster X-Fi on Windows XP. It just does not list any soundcard devices (the card X-Fi Extreme Music works ok in the system, though).

To change things with Event Ghost like Wave volume, Smart Volume Management (SVM, the X-fi's volume normalizer) etc. I had to use an external application, X-Fi Mode Changer (XFMC). This app somehow uses Creative Console of the X-Fi card to change modes, volumes and other options of the card. It allows to assign a (keyboard) hotkey to do this, the hotkey which you can simulate with Event Ghost.

Would it be possible for you to use the same kind of operation with SB Creative Console in your plugin? This would probably mean totally new plugin, though...

EDIT: here is the link to the XFMC, http://www.spectra9.com/xfmc/xfmc.html
User avatar
dexter98
Plugin Developer
Posts: 49
Joined: Sun Dec 30, 2007 2:45 am
Location: Netherlands
Contact:

Re: SoundMixerEx

Post by dexter98 »

No, unfortunately not.

Only the controls that are also available in Windows Volume Control, can be controlled from the plugin. It seems that the the XFi uses a completely different API. However, if controls that ARE available through the Windows Volume Control, then they should show up in the SoundMixerEx plugin and if they are not displayed, it might be a bug.
Beholder
Posts: 24
Joined: Sat Apr 18, 2009 3:39 pm

Re: SoundMixerEx

Post by Beholder »

Sorry to post so late, the notification msg got caught in my spam filter.

here is a screenshot that proves this could be a bug, it shows following:
- latest EG
- "play control" window, this is a part of Win XP system, I checked the Help > about Volume Control
- window of EG action "system: set master volume", where you can see X-Fi is selectable in the drop-down,
- error messages on the left.

My basic point is that X-Fi is unselectable in any of the properties of your SoundMixerEx plugin. It is however selectable when choosing a generic system sound action of EG. Therefore it could be some bug in soundcard detection and the plugin init. As you can see, the plugin command in my "unnamed macro" (last one on the right) even says "no device/control selected". I however can't select anything.
Attachments
X-Fi problem.PNG
kalia
Experienced User
Posts: 109
Joined: Wed Aug 12, 2009 1:10 am

Re: SoundMixerEx

Post by kalia »

I just recently started using EventGhost and I like this program alot. I was playing around with the program (adding macros, actions) and seem to have messed something up.

I am using the SoundMixerEx plugin to control the volume on multiple sound cards. It used to work perfectly at first, but it recently started giving me errors.

When I double-click on the SoundMixerEx action to change the settings (i.e. change the percentage to increase/decrease volume by), the log generates the following error:

Traceback (most recent call last):
File "EventGhost.pyw", line 31, in <module>
File "C:\Program Files\EventGhost\eg\__init__.py", line 101, in Main
eg.Tasklet(eg.app.MainLoop)().run()
File "C:\Program Files\EventGhost\eg\Classes\TaskletDialog.py", line 41, in ProcessingTask
self.Configure(*args, **kwargs)
File "C:\Program Files\EventGhost\eg\Classes\ConfigDialog.py", line 126, in Configure
self.item.Configure(*args)
File "C:\Program Files\EventGhost\eg\Classes\ActionItem.py", line 107, in Configure
return self.executable.Configure(*args)
File "C:\Program Files\EventGhost\plugins\SoundMixerEx\__init__.py", line 527, in Configure
treeCtrl = self.plugin.GetTree(panel, ("Fader", "Slider"), deviceId, controlId)
File "C:\Program Files\EventGhost\plugins\SoundMixerEx\__init__.py", line 406, in GetTree
controls = self.GetControls()
File "C:\Program Files\EventGhost\plugins\SoundMixerEx\__init__.py", line 381, in GetControls
controls = self.mixer.GetDeviceLines(mixerId)
File "C:\Program Files\EventGhost\plugins\SoundMixerEx\__init__.py", line 290, in GetDeviceLines
if mixerGetDevCaps(hmixer, byref(mixercaps), sizeof(MIXERCAPS)):
ctypes.ArgumentError: argument 1: <type 'exceptions.TypeError'>: wrong type
Traceback (most recent call last):
File "wx\_misc.pyc", line 1342, in Notify
File "wx\_core.pyc", line 14720, in Notify
File "C:\Program Files\EventGhost\eg\Classes\UndoHandler\Configure.py", line 41, in Try
eg.Tasklet(self.Do)(item).run()
TaskletExit

Note that the plugin still works, but I cannot access the plugin window to change any settings. If I want to make any changes to the plugin action, I have to edit the XML file in Notepad.

I tried deleting the macros and plugin and starting from scratch but get the same error. I also updated EventGhost to the latest version but still no luck. It seems like I somehow messed something up with the Windows Sound Mixer.

I did try using the Change/Set Master Volumn macro, but that completely freezes Eventghost.

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

Re: SoundMixerEx

Post by dexter98 »

I'll look into this problem. Seems like a problem in my code indeed. I'll keep you updated.
User avatar
dexter98
Plugin Developer
Posts: 49
Joined: Sun Dec 30, 2007 2:45 am
Location: Netherlands
Contact:

Re: SoundMixerEx

Post by dexter98 »

You might want to try this updated version of the plugin. Fixed 2 small problem. The fixed original file can be found here:
[path_to_your_eventghost]plugins\SoundMixerEx\

Rename your current __init__.py file to something else (eg __init__.py.org) and copy the file I posted into this folder.
The default [path_to_your_eventghost] is 'c:\program files\EventGhost\'


Not sure by what the problem was caused, since it worked ok in the past (maybe newer version python/ctypes?). Problem also existed on my own EG install and is now fixed. Might not work correctly on systems with multiple sound cards. WinAPI sucks again :(
Attachments
__init__.py
(19.42 KiB) Downloaded 414 times
Beholder
Posts: 24
Joined: Sat Apr 18, 2009 3:39 pm

Re: SoundMixerEx

Post by Beholder »

Dude, I don't know what you did but this last update totally fixed my X-Fi working with EventGhost (actually the SoundMixerEx plugin). It's too late today, but tomorrow I'll write a full report here.
kalia
Experienced User
Posts: 109
Joined: Wed Aug 12, 2009 1:10 am

Re: SoundMixerEx

Post by kalia »

Thank you dexter98.

The updated plugin works like before. FYI, I am able to use your plugin to control multiple sound cards on my system. I have three PCI sound cards on my system. In addition to that, I am using one sound card for 3 seperate stereo outputs (using kX audio drivers). Your plugin allows me to control the volume of each of the 5 stereo outputs separately.

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

Re: SoundMixerEx

Post by dexter98 »

Nice to hear it works again as expected ;)
Beholder
Posts: 24
Joined: Sat Apr 18, 2009 3:39 pm

Re: SoundMixerEx

Post by Beholder »

I've tested several times, it just works with X-Fi now. However, I am unable to set any 'advanced' properties like SVM (Smart Volume Management), Crystalizer, etc. But that can be done via X-Fi Mode Changer.

There is not much to write about it anymore. Works.
peter
Posts: 19
Joined: Sat Jul 05, 2008 6:46 pm
Location: Belgium (NL)

Re: SoundMixerEx

Post by peter »

There still seems to be a problem with the latest attached file in the post of 2 Sept. above in combination with eventghost 0.3.7.r1194 .
I am also using windows XP with SB Xi-Fi and get following errors (due to my plantronics USB headset) when using the dialogs:

When I double-click on the SoundMixerEx action to change the settings, the log generates the following error:

Traceback (most recent call last):
File "EventGhost.pyw", line 31, in <module>
File "I:\Program Files\EventGhost\eg\__init__.py", line 101, in Main
eg.Tasklet(eg.app.MainLoop)().run()
File "I:\Program Files\EventGhost\eg\Classes\TaskletDialog.py", line 41, in ProcessingTask
self.Configure(*args, **kwargs)
File "I:\Program Files\EventGhost\eg\Classes\ConfigDialog.py", line 126, in Configure
self.item.Configure(*args)
File "I:\Program Files\EventGhost\eg\Classes\ActionItem.py", line 107, in Configure
return self.executable.Configure(*args)
File "I:\Program Files\EventGhost\plugins\SoundMixerEx\__init__.py", line 483, in Configure
treeCtrl = self.plugin.GetTree(panel, ("Switch"), deviceId, controlId)
File "I:\Program Files\EventGhost\plugins\SoundMixerEx\__init__.py", line 411, in GetTree
controls = self.GetControls()
File "I:\Program Files\EventGhost\plugins\SoundMixerEx\__init__.py", line 386, in GetControls
controls = self.mixer.GetDeviceLines(mixerId)
File "I:\Program Files\EventGhost\plugins\SoundMixerEx\__init__.py", line 306, in GetDeviceLines
for control in self.GetControls(hmixer, mixerline):
File "I:\Program Files\EventGhost\plugins\SoundMixerEx\__init__.py", line 342, in GetControls
controlClassTypeName = controlClass["types"][dwControlType]
KeyError: 536945271L
Traceback (most recent call last):
File "wx\_misc.pyc", line 1342, in Notify
File "wx\_core.pyc", line 14720, in Notify
File "I:\Program Files\EventGhost\eg\Classes\UndoHandler\Configure.py", line 41, in Try
eg.Tasklet(self.Do)(item).run()
TaskletExit

--------------------------------
alternatively, after switching between some actions to double-click on, i get eventually the dialog but then can not use it since I get this error on pressing cancel (and similar one when pressing OK):

Traceback (most recent call last):
File "I:\Program Files\EventGhost\eg\Classes\ButtonRow.py", line 115, in OnCancel
self.parent.OnCancel(event)
File "I:\Program Files\EventGhost\eg\Classes\TaskletDialog.py", line 166, in OnCancel
self.DispatchEvent(event, wx.ID_CANCEL)
File "I:\Program Files\EventGhost\eg\Classes\TaskletDialog.py", line 120, in DispatchEvent
self.__processingChannel.send(False)
TaskletExit



----------------------------------------------

Have found the workaround solution: have attached a new version of the file here. It will catch the exception and log the missing ID in the eventlog for now.

The result of running it with this attached file with some logging print statement in the catch will give this message now in the log, which might give you a clue on which ID is missing, to find an alternative fix for the missing key error in the earlier version:
<UNKNOWN> Bass Boost 5 Switch


You might want to try this again updated version of the plugin to solve this reported error. The fixed original file can be found here:
[path_to_your_eventghost]plugins\SoundMixerEx\

Rename your current __init__.py file to something else (eg __init__.py.org) and copy the file I posted into this folder.
The default [path_to_your_eventghost] is 'c:\program files\EventGhost\'
Attachments
__init__.py
(19.6 KiB) Downloaded 449 times
User avatar
dexter98
Plugin Developer
Posts: 49
Joined: Sun Dec 30, 2007 2:45 am
Location: Netherlands
Contact:

Re: SoundMixerEx

Post by dexter98 »

Just ignoring this line is probably best indeed. Can't find any other defined controls, so driver might expose some weird control or something :s
User avatar
Maniaxx
Posts: 3
Joined: Tue Jul 29, 2008 2:15 am
Location: Germany

Re: SoundMixerEx

Post by Maniaxx »

Is it possible to change bass/treble as well? Not sure if these are standard controls. The fixed script seems to work and enumerates many 'main volume' sliders. I couldn't test them all yet.

Image

Win7 32Bit
SB Audigy2 ZS (Audigy_SupportPack_3_8)
kalia
Experienced User
Posts: 109
Joined: Wed Aug 12, 2009 1:10 am

Re: SoundMixerEx

Post by kalia »

Hi dexter98,

I just upgraded to Windows 7 (64 bit) from XP. I tried your plugin in the Windows 7 machine and found out that I nolonger have access to each individual volume mixer (I am using the kx driver to expose each seperate stereo channel on 2 multi channel sound cards). I tried running Eventghost in XP compatibility mode without any luck. Any chance that you will be updating this plugin?

Thanks,

Kalia
Post Reply