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.

Library: AudioEndpointControl

Do you have questions about writing plugins or scripts in Python? Meet the coders here.
User avatar
topix
Experienced User
Posts: 441
Joined: Sat May 05, 2007 3:43 pm
Location: Germany
Contact:

Re: Library: AudioEndpointControl

Post by topix »

Sem;colon wrote:with my modification of the system plugin,
Where do i find this modified plugin? Or if didn't released it here, can you send it to me please?
jonib
Plugin Developer
Posts: 1328
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: Library: AudioEndpointControl

Post by jonib »

topix wrote:Where do i find this modified plugin? Or if didn't released it here, can you send it to me please?
Here

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
User avatar
topix
Experienced User
Posts: 441
Joined: Sat May 05, 2007 3:43 pm
Location: Germany
Contact:

Re: Library: AudioEndpointControl

Post by topix »

aah, thanks. I thought that is the AudioEndPoint plugin. :oops: :oops:
In the next days i will test and integrate it.
jonib
Plugin Developer
Posts: 1328
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: Library: AudioEndpointControl

Post by jonib »

Sem;colon wrote:.GetMute() returns an integer, not a boolean while .SetMute() needs Boolean. Otherwise I would have never done the "==1" stuff in the first place. But I changed it to this now:
Could you show me an example/situation for when .SetMute() has a problem with a non Boolean arg? I use both a 0 (zero) and 1 and there is no problem.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
Sem;colon
Plugin Developer
Posts: 625
Joined: Sat Feb 18, 2012 10:51 am
Location: Germany

Re: Library: AudioEndpointControl

Post by Sem;colon »

hmm, no, sorry, I can't reproduce it any more (don't know what I did back then, but I remember getting an error or at least it wasn't working...)
Well, if integer is the way to go, I'm fine, I can change the plugin, but then I'd ask you to change OnNotify Notify.Muted to integer as well, for consistency, as this is Boolean.
If you like my work, Image me a drink :wink:
jonib
Plugin Developer
Posts: 1328
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: Library: AudioEndpointControl

Post by jonib »

Sem;colon wrote:hmm, no, sorry, I can't reproduce it any more (don't know what I did back then, but I remember getting an error or at least it wasn't working...)
OK
Well, if integer is the way to go, I'm fine, I can change the plugin, but then I'd ask you to change OnNotify Notify.Muted to integer as well, for consistency, as this is Boolean.
Apparently I typecast the result to Boolean, so I can remove that.

The interesting thing is that the Windows API documentation declares it to be a Boolean and the comtypes API interface definition declares it as a Boolean but it still comes out as Integer, so it might be a bug in the comtypes library and might change in a later version.

So the question should we keep it as an integer that the API gives us or change it to Boolean? I kinda like it to be a Boolean as it seems more clear that Mute is True or False.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
Sem;colon
Plugin Developer
Posts: 625
Joined: Sat Feb 18, 2012 10:51 am
Location: Germany

Re: Library: AudioEndpointControl

Post by Sem;colon »

jonib wrote:So the question should we keep it as an integer that the API gives us or change it to Boolean? I kinda like it to be a Boolean as it seems more clear that Mute is True or False.
I agree, but if the system default is int somehow, so that's OK for me as well. It should just be consistent.
So, from my point, whatever you prefer! :)
If you like my work, Image me a drink :wink:
jonib
Plugin Developer
Posts: 1328
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: Library: AudioEndpointControl

Post by jonib »

Sem;colon wrote:I agree, but if the system default is int somehow, so that's OK for me as well. It should just be consistent.
So, from my point, whatever you prefer! :)
So it's defined as Boolean everywhere, I like it to Boolean so I'll make it Boolean, thanks for the input.

I'll try to fix the library based on the modifications done by topic2k today, so it can be used in EventGhost.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
Post Reply