AudioEndpoint

Questions and comments specific to a particular plugin should go here.
Sem;colon
Experienced User
Posts: 582
Joined: Sat Feb 18, 2012 10:51 am
Location: Germany

Re: AudioEndpoint

Post by Sem;colon » Mon Feb 29, 2016 1:15 pm

HI Pako,

yes, if EventGhost doesn't shut down correctly, the child processes aren't closed, I don't think that this can be changed (or I don't know how).
It should be possible to kill the old process if the plugin starts though.
I'll try to integrate that.

jonib
Plugin Developer
Posts: 1245
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: AudioEndpoint

Post by jonib » Mon Feb 29, 2016 5:07 pm

Sem;colon wrote:I'll try to integrate that.
Hi Sem;colon
I'm working on a Audio library for a plugin, it should have the same(and more) functionality that the programs your plugin uses but implemented fully (for now at least) in Python.
You would have more control and wouldn't have to manage external programs.

If you are interested I can post the beta version? The basic functionality that your plugin uses should work including endpoint notifications (events).

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

Sem;colon
Experienced User
Posts: 582
Joined: Sat Feb 18, 2012 10:51 am
Location: Germany

Re: AudioEndpoint

Post by Sem;colon » Tue Mar 01, 2016 12:36 pm

If you are interested I can post the beta version?
Yes, sounds great! :)

jonib
Plugin Developer
Posts: 1245
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: AudioEndpoint

Post by jonib » Tue Mar 01, 2016 3:23 pm

Sem;colon wrote:Yes, sounds great! :)
OK, I have posted the initial version in the Coding corner here.

It should be usable, but there are mostly no error checking and there are probably bugsa galore. 8)

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

Sem;colon
Experienced User
Posts: 582
Joined: Sat Feb 18, 2012 10:51 am
Location: Germany

Re: AudioEndpoint

Post by Sem;colon » Sun Mar 13, 2016 6:47 pm

New Version!

v2.0:
-The plugin now uses the AudioEndpointControl library provided by jonib and not uses external tools any more.
-Replaced action "Get Default Audio Render" with "Get Default Audio Device" (you can now choose the role and flow direction of the default device you would like to get)
-Extended actions "Set Default Render", "Next Default Audio Render" and "Previous Default Audio Render" (It's now possible to select a role for the default render device you set (Console, Communication, Multimedia))
-Some responses may have changed, check your macros after updating!

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

Re: AudioEndpoint

Post by blackwind » Sun Mar 13, 2016 11:07 pm

Now that this plugin no longer depends on an external executable, I'd like to see it expanded and rolled into EventGhost as a replacement for VistaVolEvents and the "Sound Card" actions. Is that something you'd be willing to work on, Semi?
/bw

blaher
Experienced User
Posts: 467
Joined: Thu Nov 17, 2011 1:27 am

Re: AudioEndpoint

Post by blaher » Mon Mar 14, 2016 12:03 am

Sem;colon wrote:New Version!

v2.0:
-The plugin now uses the AudioEndpointControl library provided by jonib
Thanks to both of you! It's a very handy plugin.
-Some responses may have changed, check your macros after updating!
Yes, a quick 'ctrl+f' with 'audioendpoint' lets you find and reset them easily.

Sem;colon
Experienced User
Posts: 582
Joined: Sat Feb 18, 2012 10:51 am
Location: Germany

Re: AudioEndpoint

Post by Sem;colon » Thu Mar 17, 2016 1:56 pm

blackwind wrote:Now that this plugin no longer depends on an external executable, I'd like to see it expanded and rolled into EventGhost as a replacement for VistaVolEvents and the "Sound Card" actions. Is that something you'd be willing to work on, Semi?
There are Pros and Cons to this.
On the one hand it increases out of the box functionality but on the other hand we may have:
-Problems with backwards compatibility
-More events that some people may not need (The system plugin, where the soundcard actions belong to, is always loaded)

Anyway, what's wrong with the VistaVolEvents? They work just fine, don't they? :wink:

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

Re: AudioEndpoint

Post by blackwind » Fri Mar 18, 2016 2:16 am

VistaVolEvents has four main issues:
  1. It only provides events for the default device.
  2. It can't differentiate between similarly named devices.
  3. Doing things via C/C++ rather than Python makes for a higher barrier to entry for new developers. There's a complete build environment on my system, sure, but what if Average Joe finds a bug and wants to contribute? If we replace VistaVolEvents, all he needs is a copy of EventGhost. Long-term, we hope to replace all the .pyds we bundle.
  4. Stackless Python doesn't support mixed-mode debugging, so VistaVolEvents can't be stepped through. Python code can.
Backwards compatibility isn't an issue if approached correctly. Keyboard+, for example, is a drop-in, fully backwards compatible replacement for the stock Keyboard plugin.

All that being said, I understand that this isn't a trivial undertaking, and I understand that not everyone has the time to invest that I do. If I wake up to a pull request one day over at GitHub, perfect; if not, know that your work on the plugin is appreciated either way.
/bw

Raghu18
Posts: 1
Joined: Fri Mar 25, 2016 9:08 am

Not being able to make it work, Please help.

Post by Raghu18 » Fri Mar 25, 2016 9:31 am

Hello,
I am new to Eventghost and infact I installed eventghost just to be able to reduces system volume when headphones is connected. But I just can't figure out how to make this work. Please bear with my novice questions.

I added a macro for : "Get default audio device". But plugging in or pulling out the headphones does not not reflect anything in logs. I even tried "Set default audio render" still nothing.

Even the logs in the screen shot only came because I clicked on the green button after selecting the macros.

Please help me out, I don't understand what I am missing here, is there anything else I should add, any events or something like that for the logs to reflect ?

PS: my machine is a Dell XPS L502x running Windows 10 and uses Realtek High Definition Audio. Further my system has two headphone ports, I tried both.
Attachments
Untitled.png
Screenshot

Sem;colon
Experienced User
Posts: 582
Joined: Sat Feb 18, 2012 10:51 am
Location: Germany

Re: AudioEndpoint

Post by Sem;colon » Sun Mar 27, 2016 8:03 pm

@Blackwind: I agree then, I wasn't aware of those limitations.
Anyway, let's first see how good the lib from jonib works and then integrate it into EventGhost.

@Raghu18:
you just need to load the plugin (basically what you did), that's all you need to receive those events.
However, the plugin didn't seem to load correctly.
If it does, you receive a message "Audio Entpoint plugin started" and also some events on startup.
blaaa.PNG
Can you try an older version of the plugin and tell us if it works better?

blaher
Experienced User
Posts: 467
Joined: Thu Nov 17, 2011 1:27 am

Re: AudioEndpoint

Post by blaher » Tue May 31, 2016 3:10 am

I use a receiver for my audio, but when I change inputs, the receiver disappears from Windows, so sometimes the 'set default to:' macro fires and gives this error. I mean, it should give an error, because the receiver doesn't exist then, but I was wondering does it affect anything by the plugin not accounting for a missing default?
Attachments
Capture.JPG

Sem;colon
Experienced User
Posts: 582
Joined: Sat Feb 18, 2012 10:51 am
Location: Germany

Re: AudioEndpoint

Post by Sem;colon » Tue May 31, 2016 11:33 am

No, but the error message should look better, I'll correct it in the next version.

blaher
Experienced User
Posts: 467
Joined: Thu Nov 17, 2011 1:27 am

Re: AudioEndpoint

Post by blaher » Thu Jun 02, 2016 12:22 am

Sem;colon wrote:No, but the error message should look better, I'll correct it in the next version.
Cheers. I had a freeze exiting EG, and this was the last line in the .log.
10:14:03: 0 ActionThread: closing C:\Program Files (x86)\EventGhost\plugins\AudioEndpoint

AudioEndpoint(control) version = "2.0"
EG 1722
Win 7 x64

Sem;colon
Experienced User
Posts: 582
Joined: Sat Feb 18, 2012 10:51 am
Location: Germany

Re: AudioEndpoint

Post by Sem;colon » Sat Jun 04, 2016 9:37 am

blaher wrote:I had a freeze exiting EG, and this was the last line in the .log.
10:14:03: 0 ActionThread: closing C:\Program Files (x86)\EventGhost\plugins\AudioEndpoint
Is there a way to reproduce this?

Post Reply