Library: AudioEndpointControl

Do you have questions about writing plugins or scripts in Python? Meet the coders here.

Re: Library: AudioEndpointControl

Postby topix » Sun Jan 01, 2017 10:37 am

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?
topix
Experienced User
 
Posts: 280
Joined: Sat May 05, 2007 3:43 pm
Location: Germany

Re: Library: AudioEndpointControl

Postby jonib » Sun Jan 01, 2017 2:55 pm

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
jonib
Plugin Developer
 
Posts: 1207
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: Library: AudioEndpointControl

Postby topix » Sun Jan 01, 2017 7:54 pm

aah, thanks. I thought that is the AudioEndPoint plugin. :oops: :oops:
In the next days i will test and integrate it.
topix
Experienced User
 
Posts: 280
Joined: Sat May 05, 2007 3:43 pm
Location: Germany

Re: Library: AudioEndpointControl

Postby jonib » Mon Jan 09, 2017 1:07 am

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
jonib
Plugin Developer
 
Posts: 1207
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: Library: AudioEndpointControl

Postby Sem;colon » Tue Jan 10, 2017 12:06 am

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.
Sem;colon
Experienced User
 
Posts: 560
Joined: Sat Feb 18, 2012 10:51 am
Location: Germany

Re: Library: AudioEndpointControl

Postby jonib » Tue Jan 10, 2017 1:57 am

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
jonib
Plugin Developer
 
Posts: 1207
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: Library: AudioEndpointControl

Postby Sem;colon » Fri Jan 13, 2017 9:18 am

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! :)
Sem;colon
Experienced User
 
Posts: 560
Joined: Sat Feb 18, 2012 10:51 am
Location: Germany

Re: Library: AudioEndpointControl

Postby jonib » Fri Jan 13, 2017 1:46 pm

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
jonib
Plugin Developer
 
Posts: 1207
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Previous

Return to Coding Corner

Who is online

Users browsing this forum: No registered users and 1 guest