Action "Get Mute Status" on a microphone

If you have a question or need help, this is the place to be.
Snowbird
Experienced User
Posts: 374
Joined: Fri Jul 03, 2009 10:04 am

Action "Get Mute Status" on a microphone

Post by Snowbird » Sat Nov 02, 2013 9:47 am

Hello Everyone,

I have 2 problems that might be related, they both deal with the SoundCard.

Let me first tell you what I want to do before describing the problem. :)

I'm using a laptop that has a built-in speaker and a microphone, I use it a lot for audio conferencing everyday and obviously I need to mute the microphone many times during a conference (because of a parallel call phone for example, or many other reason that might arise during a conference). I don't have any LED indicator that tells me the microphone is muted or not, so I thought I could make my own indicator using the OSD feature of EG.
What I want is : I want to know the state of the microphone in a quick manner just by looking at my screen.


Problem #1 :
When I try to add the action "Get Mute Status" my SoundCard detects 3 Devices :
- Primary Sound Driver
- Speakers (Conexant 20585 SmartAudio HD)
- Internal Microphone (Conexant 20585 SmartAudio HD)

If I select any of them, they all give me the speaker state (muted or not muted), that means that when I select "Internal Microphone" it doesn't work, since it gives me the state of the speaker instead. This is very strange because EG is able to detect and list all the SoundCard devices correctly (speakers + microphone), but is unable to control the microphone status as expected... Does anyone know how to make this thing work ?

Problem #2 :
I observed this problem on a Desktop computer too (so it must be a general issue, not only with my laptop)
When I try to add the action "Set Master Volume" I get the following error right away ! and the action is not added of course.
10:06:42 Traceback (most recent call last) (1640):
10:06:42 File "C:\Program Files (x86)\EventGhost\eg\Classes\TaskletDialog.py", line 59, in ProcessingTask
10:06:42 self.Configure(*args, **kwargs)
10:06:42 File "C:\Program Files (x86)\EventGhost\eg\Classes\ConfigDialog.py", line 165, in Configure
10:06:42 treeItem.Configure(*args)
10:06:42 File "C:\Program Files (x86)\EventGhost\eg\Classes\ActionItem.py", line 101, in Configure
10:06:42 return self.executable.Configure(*args)
10:06:42 File "C:\Program Files (x86)\EventGhost\plugins\System\__init__.py", line 1046, in Configure
10:06:42 deviceCtrl = panel.Choice(deviceId, SoundMixer.GetMixerDevices())
10:06:42 File "C:\Program Files (x86)\EventGhost\eg\Classes\ControlProviderMixin.py", line 58, in Choice
10:06:42 return eg.Choice(self, value, choices, *args, **kwargs)
10:06:42 File "C:\Program Files (x86)\EventGhost\eg\Classes\Choice.py", line 33, in __init__
10:06:42 self, parent, -1, pos, size, choices, *args, **kwargs
10:06:42 File "wx\_controls.pyc", line 494, in __init__
10:06:42 TypeError: Sequence of strings expected.
If I add the action "Change Master Volume", this one is added as expected and is ready to use without any issues.


I don't know if those 2 problems are related, but they both deal with the SoundCard, it looks like there is some reworking to do on this part.
Thank you in advance for any help you could provide.

User avatar
Pako
Plugin Developer
Posts: 2294
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:

Re: Action "Get Mute Status" on a microphone

Post by Pako » Sun Nov 03, 2013 6:58 pm

Snowbird wrote:Problem #2 :
I observed this problem on a Desktop computer too (so it must be a general issue, not only with my laptop)
When I try to add the action "Set Master Volume" I get the following error right away ! and the action is not added of course.
This looks like a bug that occurred when blackwind made ​​some modifications:
viewtopic.php?f=5&t=4041
I already have a solution. Maybe tomorrow I will give it available.

Pako

Snowbird
Experienced User
Posts: 374
Joined: Fri Jul 03, 2009 10:04 am

Re: Action "Get Mute Status" on a microphone

Post by Snowbird » Sun Nov 03, 2013 9:41 pm

Thanks Pako for your reply,

that's good news if you know how to fix Problem #2 :)

What about Problem #1 ? Do you have an idea of how to fix this ? I tried this in a python script but with no success :

Code: Select all

eg.plugins.System.GetMute('Internal Microphone (Conexant 20585 SmartAudio HD)')
Thanks again for your time.

User avatar
Pako
Plugin Developer
Posts: 2294
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:

Re: Action "Get Mute Status" on a microphone

Post by Pako » Tue Nov 05, 2013 9:01 am

Snowbird wrote:What about Problem #1 ?
I tried to contact Blackwind if he could do fix, but he did not answer me yet.
Meanwhile, you can use the following file, where is fixed at least the second problem.
__init__.py
Plugin System
(67.76 KiB) Downloaded 314 times
Pako

Snowbird
Experienced User
Posts: 374
Joined: Fri Jul 03, 2009 10:04 am

Re: Action "Get Mute Status" on a microphone

Post by Snowbird » Tue Nov 05, 2013 10:10 am

Thanks Pako,

Problem #2 is solved !!! :)

The strange thing is that I have the same behavior as in my Problem #1, I can only set the volume of my speaker, not the microphone :)
- Primary Sound Driver
- Speakers (Conexant 20585 SmartAudio HD)
- Internal Microphone (Conexant 20585 SmartAudio HD)
whatever what I choose from those 3 devices, it controls only the speaker's volume. I really hope someone could fix this, I would really like to control the microphone status.

Many thanks again Pako ! :)

Snowbird
Experienced User
Posts: 374
Joined: Fri Jul 03, 2009 10:04 am

Re: Action "Get Mute Status" on a microphone

Post by Snowbird » Mon Nov 11, 2013 10:23 am

Pako wrote:I tried to contact Blackwind if he could do fix, but he did not answer me yet.
Hi Pako, did you get any news from Blackwind ?

User avatar
Pako
Plugin Developer
Posts: 2294
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:

Re: Action "Get Mute Status" on a microphone

Post by Pako » Mon Nov 11, 2013 10:46 am

No, unfortunately not.
As I found out, so even the PM is still in my forum Outbox.
This means, that he did not read it yet.

Pako

Snowbird
Experienced User
Posts: 374
Joined: Fri Jul 03, 2009 10:04 am

Re: Action "Get Mute Status" on a microphone

Post by Snowbird » Fri Nov 29, 2013 12:25 am

Hi Pako, did you get any news from Blackwind ?

User avatar
Pako
Plugin Developer
Posts: 2294
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:

Re: Action "Get Mute Status" on a microphone

Post by Pako » Tue Dec 03, 2013 9:44 am

No.

User avatar
blackwind
Experienced User
Posts: 182
Joined: Wed Sep 12, 2012 2:59 am
Location: Canada
Contact:

Re: Action "Get Mute Status" on a microphone

Post by blackwind » Wed Jan 01, 2014 5:30 am

It's been a few months since I've had access to my development box, and it'll be another month or two before I will again and can properly address this. In the meantime, try accessing your device via ID rather than string, like so:

Code: Select all

eg.plugins.System.GetMute(1)
EDIT: Decided to give it a quick shot before leaving. This is largely untested, but may work.
Attachments
SoundMixer.py
(15.65 KiB) Downloaded 254 times
/bw

Snowbird
Experienced User
Posts: 374
Joined: Fri Jul 03, 2009 10:04 am

Re: Action "Get Mute Status" on a microphone

Post by Snowbird » Wed Jan 01, 2014 8:10 am

Hi Blackwind,

thanks for your time !!

I tried both suggestions and none of them have worked, it simply doesn't give me the microphone state ! :(
If you have any other idea please let me know.


PS. Happy New Year to everyone ! :)

User avatar
blackwind
Experienced User
Posts: 182
Joined: Wed Sep 12, 2012 2:59 am
Location: Canada
Contact:

Re: Action "Get Mute Status" on a microphone

Post by blackwind » Tue Mar 18, 2014 11:19 pm

Which OS are you running, Snowbird? And did these macros work in r1610?
/bw

Snowbird
Experienced User
Posts: 374
Joined: Fri Jul 03, 2009 10:04 am

Re: Action "Get Mute Status" on a microphone

Post by Snowbird » Wed Mar 19, 2014 8:55 am

Hi Blackwind,

Thanks for your reply, I'm using Win 7 64bits on a Laptop and it didn't work on a previous version of EG, so it's not a "new" problem I guess, I'm sure it has been around for some time, maybe since always.

Let me know if you want me to do some tests, if I can help you in any way to solve my problem, I will do it.

User avatar
blackwind
Experienced User
Posts: 182
Joined: Wed Sep 12, 2012 2:59 am
Location: Canada
Contact:

Re: Action "Get Mute Status" on a microphone

Post by blackwind » Wed Mar 19, 2014 11:08 am

Managed to reproduce and resolve it.

This should be fit for inclusion in the next build, Pako.
Attachments
patch.zip
(62.11 KiB) Downloaded 273 times
/bw

Snowbird
Experienced User
Posts: 374
Joined: Fri Jul 03, 2009 10:04 am

Re: Action "Get Mute Status" on a microphone

Post by Snowbird » Wed Mar 19, 2014 7:30 pm

THANK YOU !!! :)

I confirm, It's finally working !!

One last question, is there a way to fire an Event when the Microphone is muted / unmuted ? It's already possible to fire an event when the speaker sound is muted/unmuted, there might be a way to do the same thing for the microphone ?

As I was explaining in my very first post
I don't have any LED indicator that tells me the microphone is muted or not, so I thought I could make my own indicator using the OSD feature of EG.
What I want is : I want to know the state of the microphone in a quick manner just by looking at my screen.
The thing is now that the microphone state works, I have to check the state of the microphone every 1 second to display on the screen the actual state (probably with a loop, I don't know how to do that with EG). That's why I'm asking if there is a way to fire an event when the microphone is muted/unmuted, it would be much easier for me.

Again, a BIG thank you for both of you, Blackwind and Pako !!

Post Reply